コード例 #1
0
ファイル: test_nlp_pos.py プロジェクト: xiongzhp/CETM
 def test_text_sentence(self):
     """Test tagging through the Text and Sentence API."""
     t = Text('And now for something completely different', pos_tagger=ApPosTagger())
     self.assertEqual(
         [[(u'And', u'CC'), (u'now', u'RB'), (u'for', u'IN'), (u'something', u'NN'), (u'completely', u'RB'), (u'different', u'JJ')]],
         t.pos_tagged_tokens
     )
コード例 #2
0
ファイル: test_nlp_pos.py プロジェクト: xiongzhp/CETM
 def setUpClass(cls):
     cls.t = ApPosTagger()