def test_unify_untranscribed_x_part_of_word(self): """Test `x` being part of a word.""" utterance = 'Regex' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'Regex' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_x(self): """Test `x`.""" utterance = 'x.' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = '???.' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_repetition(self): """Test repetition.""" utterance = 'test [x 2]' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'test [x 2]' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_yyy_scoped(self): """Test `yyy` within scoping.""" utterance = 'This <yyy good> [=! good]' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'This <??? good> [=! good]' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_ww(self): """Test `ww`.""" utterance = 'This ww good.' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'This ??? good.' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_yyy_terminator(self): """Test `yyy` with terminator.""" utterance = 'yyy.' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = '???.' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_multiple_yyy(self): """Test multiple `yyy`s.""" utterance = 'This yyy yyy good' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'This ??? ??? good' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_yyy_within_word(self): """Test `yyy` occurring in word.""" utterance = 'yyyia' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'yyyia' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_five_y(self): """Test with five `y`s.""" utterance = 'yyyyy' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = '???' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_xxx_within(self): """Test with `xxx` within utterance.""" utterance = 'This xxx great' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'This ??? great' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_xxx_end(self): """Test with `xxx` at the end of utterance.""" utterance = 'This is xxx' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = 'This is ???' self.assertEqual(actual_output, desired_output)
def test_unify_untranscribed_xxx_start(self): """Test with `xxx` at the start of utterance.""" utterance = 'xxx great' actual_output = TurkishCleaner.unify_untranscribed(utterance) desired_output = '??? great' self.assertEqual(actual_output, desired_output)