Esempio n. 1
0
 def test_remove_linkers_empty_string(self):
     """Test remove_linkers with empty string."""
     actual_output = CHATUtteranceCleaner.remove_linkers('')
     desired_output = ''
     self.assertEqual(actual_output, desired_output)
Esempio n. 2
0
 def test_remove_linkers_other_completion_linker(self):
     """Test remove_linkers with self completion linker (+,)."""
     actual_output = CHATUtteranceCleaner.remove_linkers(
         '++ he would have come.')
     desired_output = 'he would have come.'
     self.assertEqual(actual_output, desired_output)
Esempio n. 3
0
 def test_remove_linkers_self_completion_linker(self):
     """Test remove_linkers with self completion linker (+,)."""
     actual_output = CHATUtteranceCleaner.remove_linkers(
         '+, I go straight ahead.')
     desired_output = 'I go straight ahead.'
     self.assertEqual(actual_output, desired_output)
Esempio n. 4
0
 def test_remove_linkers_lazy_overlap_marking_linker(self):
     """Test remove_linkers with lazy overlap linker (+<)."""
     actual_output = CHATUtteranceCleaner.remove_linkers(
         '+< they had to go in here.')
     desired_output = 'they had to go in here.'
     self.assertEqual(actual_output, desired_output)
Esempio n. 5
0
 def test_remove_linkers_quick_uptake_linker(self):
     """Test remove_linkers with quick uptake linker (+^)."""
     actual_output = CHATUtteranceCleaner.remove_linkers(
         '+^ where is  my truck?')
     desired_output = 'where is  my truck?'
     self.assertEqual(actual_output, desired_output)
Esempio n. 6
0
 def test_remove_linkers_quoted_utterance_linker_no_slash(self):
     """Test remove_linkers with quoted utterance linker (+")."""
     actual_output = CHATUtteranceCleaner.remove_linkers(
         '+" where is my truck?')
     desired_output = 'where is my truck?'
     self.assertEqual(actual_output, desired_output)