Пример #1
0
 def test_get_retracing_actual_no_whitespace(self):
     """Test with missing whitespace."""
     utterance = 'this is[/] is a test'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'this is is a test'
     self.assertEqual(actual_output, desired_output)
Пример #2
0
 def test_get_retracing_actual_retracing_several_words_no_whitespace(self):
     """Test retracing with several words and missing whitespace."""
     utterance = '<this is>[/] this is a test'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'this is this is a test'
     self.assertEqual(actual_output, desired_output)
Пример #3
0
 def test_get_retracing_actual_false_start_several_words(self):
     """Test get_retracing_actual."""
     utterance = '<I want> [///] what do you eat'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'I want what do you eat'
     self.assertEqual(actual_output, desired_output)
Пример #4
0
 def test_get_retracing_actual_false_start(self):
     """Test get_retracing_actual."""
     utterance = 'I want [/-] would do that'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'I want would do that'
     self.assertEqual(actual_output, desired_output)
Пример #5
0
 def test_get_retracing_actual_reformulation_several_words(self):
     """Test get_retracing_actual."""
     utterance = '<for what> [///] why do you eat'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'for what why do you eat'
     self.assertEqual(actual_output, desired_output)
Пример #6
0
 def test_get_retracing_actual_correction_several_words(self):
     """Test get_retracing_actual."""
     utterance = '<this us> [//] this is a test'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'this us this is a test'
     self.assertEqual(actual_output, desired_output)
Пример #7
0
 def test_get_retracing_actual_retracing(self):
     """Test get_retracing_actual."""
     utterance = 'this is [/] is a test'
     actual_output = Extractor.get_retracing_actual(utterance)
     desired_output = 'this is is a test'
     self.assertEqual(actual_output, desired_output)