コード例 #1
0
ファイル: test_corpus.py プロジェクト: ykl7/cltk
 def test_phi5_plaintext_cleanup_rm_periods_bytes(self):
     """Test post-TLGU cleanup of text of Latin PHI5 text."""
     dirty = '\xcc\x81 Virum áge 999 mihi.'
     clean = phi5_plaintext_cleanup(dirty,
                                    rm_punctuation=True,
                                    rm_periods=True)
     target = '́ Virum áge mihi'
     self.assertEqual(clean, target)
コード例 #2
0
ファイル: test_corpus.py プロジェクト: mcneela/cltk
    def test_phi5_plaintext_cleanup_rm_periods(self):
        """Test post-TLGU cleanup of text of Latin PHI5 text."""
        dirty = """        {ODYSSIA}
        {Liber I}
Virum áge 999 mihi, Camena, (insece) versutum.
Pater noster, Saturni filie . . .
Mea puera, quid verbi ex tuo ore supera fugit?
argenteo polubro, aureo eclutro. """
        clean = phi5_plaintext_cleanup(dirty, rm_punctuation=True, rm_periods=True)
        target = ' Virum áge mihi Camena versutum Pater noster Saturni filie Mea puera quid verbi ex tuo ore supera fugit argenteo polubro aureo eclutro '  # pylint: disable=line-too-long
        self.assertEqual(clean, target)
コード例 #3
0
    def test_phi5_plaintext_cleanup_rm_periods(self):
        """Test post-TLGU cleanup of text of Latin PHI5 text."""
        dirty = """        {ODYSSIA}
        {Liber I}
Virum áge 999 mihi, Camena, (insece) versutum.
Pater noster, Saturni filie . . .
Mea puera, quid verbi ex tuo ore supera fugit?
argenteo polubro, aureo eclutro. """
        clean = phi5_plaintext_cleanup(dirty, rm_punctuation=True, rm_periods=True)
        target = " Virum áge mihi Camena versutum Pater noster Saturni filie Mea puera quid verbi ex tuo ore supera fugit argenteo polubro aureo eclutro "  # pylint: disable=line-too-long
        self.assertEqual(clean, target)
コード例 #4
0
ファイル: test_corpus.py プロジェクト: mcneela/cltk
 def test_phi5_plaintext_cleanup_rm_periods_bytes(self):
     """Test post-TLGU cleanup of text of Latin PHI5 text."""
     dirty = '\xcc\x81 Virum áge 999 mihi.'
     clean = phi5_plaintext_cleanup(dirty, rm_punctuation=True, rm_periods=True)
     target = '́ Virum áge mihi'
     self.assertEqual(clean, target)