Esempio n. 1
0
 def test_replace_eng_multiple_engs(self):
     """Test replace_eng with 4 Engs to be replaced."""
     gloss_tier = 'remove~by. emph Eng Eng Eng Eng'
     utterance = 'min~in~ikiniu~h wâsh these are taken off'
     actual_output = CreeCleaner.replace_eng(gloss_tier, utterance)
     desired_output = 'remove~by. emph these are taken off'
     self.assertEqual(actual_output, desired_output)
Esempio n. 2
0
 def test_replace_eng_at_beginning_end(self):
     """Test replace_eng with Engs at the start/end of the gloss."""
     gloss_tier = 'Eng fin~3.sg Eng'
     utterance = 'garbage â~u garbage'
     actual_output = CreeCleaner.replace_eng(gloss_tier, utterance)
     desired_output = 'garbage fin~3.sg garbage'
     self.assertEqual(actual_output, desired_output)
Esempio n. 3
0
 def test_replace_eng_single_eng(self):
     """Test replace_eng with 1 Eng to be replaced."""
     gloss_tier = 'Eng'
     utterance = 'floor'
     actual_output = CreeCleaner.replace_eng(gloss_tier, utterance)
     desired_output = 'floor'
     self.assertEqual(actual_output, desired_output)
Esempio n. 4
0
    def test_replace_eng_tiers_misaligned(self):
        """Test replace_eng with word tier longer than gloss tier.

        Since tiers are of unequal length, return the gloss tier
        unchanged.
        """
        gloss_tier = 'Eng fin~3.sg'
        utterance = 'garbage â~u garbage'
        actual_output = CreeCleaner.replace_eng(gloss_tier, utterance)
        desired_output = 'Eng fin~3.sg'
        self.assertEqual(actual_output, desired_output)
Esempio n. 5
0
 def test_replace_eng_emtpy_string(self):
     """Test replace_eng with an empty string."""
     actual_output = CreeCleaner.replace_eng('', '')
     desired_output = ''
     self.assertEqual(actual_output, desired_output)