Пример #1
0
 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)
Пример #2
0
 def test_segmenter_json(self):
     corpus = seg1(an(to(text1)).to_json())
     corpus = Corpus.construct(corpus)
     self.assertEqual(len(corpus.clauses), 2)
Пример #3
0
 def test_json(self):
     corpus = Corpus.construct(vb(se(an(to(text))).to_json()))
     self.assertEqual(len(corpus.verb_chains), 3)
Пример #4
0
 def test_basic_json(self):
     ner_tagged = Corpus.construct(tagger(analyzer(tokenizer(text)).to_json()))
     self.assertEqual(len(ner_tagged.named_entities), 13)
Пример #5
0
 def test_json(self):
     corpus = Corpus.construct(ta(an(to(text)).to_json()))
     self.assertEqual(len(corpus.timexes), 3)