code: 
  '''simple docstring'''
  
  
  
  
  
  import unittest
  
  from cer import CER
  
  
  A           =   CER()
  
  
  
  class  lowerCAmelCase__   (       unittest.TestCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def 		_lowerCamelCase	(self  : Any    )   ->       List[str]:
          snake_case_						       =							["White House"]
          snake_case_						       =							["white house"]
          # S = 2, D = 0, I = 0, N = 11, CER = 2 / 11
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.1_818_181_818    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       List[Any]:
          snake_case_						       =							["were wolf"]
          snake_case_						       =							["werewolf"]
          # S = 0, D = 0, I = 1, N = 9, CER = 1 / 9
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.1_111_111    ) < 1E-6    )
  
          snake_case_						       =							["werewolf"]
          snake_case_						       =							["weae     wolf"]
          # S = 1, D = 1, I = 0, N = 8, CER = 0.25
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.25    ) < 1E-6    )
  
          # consecutive whitespaces case 1
          snake_case_						       =							["were wolf"]
          snake_case_						       =							["were               wolf"]
          # S = 0, D = 0, I = 0, N = 9, CER = 0
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.0    ) < 1E-6    )
  
          # consecutive whitespaces case 2
          snake_case_						       =							["were   wolf"]
          snake_case_						       =							["were               wolf"]
          # S = 0, D = 0, I = 0, N = 9, CER = 0
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.0    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : int    )   ->       int:
          snake_case_						       =							["werewolf"]
          snake_case_						       =							["weaewolf"]
          # S = 1, D = 0, I = 0, N = 8, CER = 0.125
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.125    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : Any    )   ->       Any:
          snake_case_						       =							["werewolf"]
          snake_case_						       =							["wereawolf"]
          # S = 0, D = 1, I = 0, N = 8, CER = 0.125
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.125    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Any:
          snake_case_						       =							["werewolf"]
          snake_case_						       =							["wereolf"]
          # S = 0, D = 0, I = 1, N = 8, CER = 0.125
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.125    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Dict:
          snake_case_						       =							["werewolf"]
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, 0.0    )
  
    def 		_lowerCamelCase	(self  : str    )   ->       List[Any]:
          snake_case_						       =							["werewolf", "I am your father"]
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, 0.0    )
  
          snake_case_						       =							["werewolf", "I am your father", "doge"]
          snake_case_						       =							["werxwolf", "I       am your father", "doge"]
          # S = 1, D = 0, I = 0, N = 28, CER = 1 / 28
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.03_571_428    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : str    )   ->       List[str]:
          snake_case_						       =							["My hovercraft", "is full of eels"]
          snake_case_						       =							["My hovercraft is full", " of eels"]
          # S = 0, D = 0, I = 2, N = 28, CER = 2 / 28
          # whitespace at the front of " of eels" will be strip during preporcessing
          # so need to insert 2 whitespaces
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_	, concatenate_texts=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.071_428    ) < 1E-6    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       List[str]:
          snake_case_						       =							["我能吞下玻璃而不伤身体"]
          snake_case_						       =							[" 能吞虾玻璃而 不霜身体啦"]
          # S = 3, D = 2, I = 0, N = 11, CER = 5 / 11
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.4_545_454_545    ) < 1E-6    )
  
          snake_case_						       =							["我能吞下玻璃", "而不伤身体"]
          snake_case_						       =							["我    能 吞 下 玻 璃", "而不伤身体"]
          # S = 0, D = 5, I = 0, N = 11, CER = 5 / 11
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertTrue(abs(char_error_rate - 0.454_545_454_545    ) < 1E-6    )
  
          snake_case_						       =							["我能吞下玻璃而不伤身体"]
          snake_case_						       =							cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
          self.assertFalse(lowerCAmelCase_	, 0.0    )
  
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Dict:
          snake_case_						       =							[""]
          snake_case_						       =							["Hypothesis"]
          with self.assertRaises(lowerCAmelCase_    ):
                cer.compute(predictions=lowerCAmelCase_	, references=lowerCAmelCase_    )
  
  
  if __name__ == "__main__":
       unittest.main()
  
  
style_context: 
  '''simple docstring'''
  
  
  
  
  
  def   snake_case_       (							_a     :							int = 1_000			):
        return sum(i for i in range(_a			) if i % 3 == 0 or i % 5 == 0			)
  
  
  if __name__ == "__main__":
       print(F"""{solution() = }""")
  
  