def test_segmenter_json_ignore_missing_commas(self): corpus = seg2(an(to(text2)).to_json()) corpus = Corpus.construct(corpus) self.assertEqual(len(corpus.clauses), 4)
def test_segmenter_json(self): corpus = seg1(an(to(text1)).to_json()) corpus = Corpus.construct(corpus) self.assertEqual(len(corpus.clauses), 2)
def test_json(self): corpus = Corpus.construct(vb(se(an(to(text))).to_json())) self.assertEqual(len(corpus.verb_chains), 3)
def test_basic_json(self): ner_tagged = Corpus.construct(tagger(analyzer(tokenizer(text)).to_json())) self.assertEqual(len(ner_tagged.named_entities), 13)
def test_json(self): corpus = Corpus.construct(ta(an(to(text)).to_json())) self.assertEqual(len(corpus.timexes), 3)