Пример #1
0
 def test_make_syllables_greek(self):
     """Test _make_syllables method."""
     correct = [[['νε', 'ος'], ['μεν'], ['και'], ['α', 'πει', 'ρος'],
                 ['δι', 'κων'], ['ε', 'γω', 'γε'], ['ε', 'τι']],
                [['μεν'], ['και'], ['α', 'πει', 'ρος']]]
     current = ScansionGreek()._make_syllables(self.test)
     self.assertEqual(current, correct)
Пример #2
0
 def test_scan_text_greek(self):
     """Test scan_text method."""
     correct = ['˘¯¯¯˘¯¯˘¯˘¯˘˘x', '¯¯˘¯x']
     current = ScansionGreek().scan_text(self.test)
     self.assertEqual(current, correct)
Пример #3
0
 def test_clean_accents_greek(self):
     """Test _clean_accents method."""
     correct = "νεος μεν και απειρος δικων εγωγε ετι. μεν και απειρος."
     current = ScansionGreek()._clean_accents(self.test)
     self.assertEqual(current, correct)
Пример #4
0
 def test_tokenize_greek(self):
     """Test _tokenize method."""
     correct = [['νεος', 'μεν', 'και', 'απειρος', 'δικων', 'εγωγε', 'ετι.'],
                ['μεν', 'και', 'απειρος.']]
     current = ScansionGreek()._tokenize(self.test)
     self.assertEqual(current, correct)
Пример #5
0
 def test_clean_text_greek(self):
     """Test _clean_text method."""
     correct = "νέος μὲν καὶ ἄπειρος δικῶν ἔγωγε ἔτι. μὲν καὶ ἄπειρος."
     current = ScansionGreek()._clean_text(self.test)
     self.assertEqual(current, correct)