예제 #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
파일: test_ner.py 프로젝트: cbentes/estnltk
 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)