def test_get_retracing_target_correction_no_whitespace(self): """Test with correction and missing whitespace.""" utterance = 'this us[//] is a test' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'this is is a test' self.assertEqual(actual_output, desired_output)
def test_get_retracing_target_false_start_several_words(self): """Test get_retracing_target.""" utterance = '<I want> [///] what do you eat' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'I want what do you eat' self.assertEqual(actual_output, desired_output)
def test_get_retracing_target_false_start(self): """Test get_retracing_target.""" utterance = 'I want [/-] would do that' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'I want would do that' self.assertEqual(actual_output, desired_output)
def test_get_retracing_target_reformulation_several_words(self): """Test get_retracing_target.""" utterance = '<for what> [///] why do you eat' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'for what why do you eat' self.assertEqual(actual_output, desired_output)
def test_get_retracing_target_correction_several_words(self): """Test get_retracing_target.""" utterance = '<this us> [//] this is a test' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'this us this is a test' self.assertEqual(actual_output, desired_output)
def test_get_retracing_target_retracing(self): """Test get_retracing_target.""" utterance = 'this is [/] is a test' actual_output = Extractor.get_retracing_target(utterance) desired_output = 'this is is a test' self.assertEqual(actual_output, desired_output)