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 )
def setUpClass(cls): cls.t = ApPosTagger()