예제 #1
0
파일: test_tag.py 프로젝트: TylerKirby/cltk
 def test_tag_ner_str_list_french(self):
     """Test make_ner(), str, list."""
     text_str = """Berte fu mere Charlemaine, qui pukis tint France et tot le Maine."""
     ner_replacer = NamedEntityReplacer()
     tokens = ner_replacer.tag_ner_fr(input_text=text_str, output_type=list)
     target = [[('Berte', 'entity', 'CHI')], ('fu',), ('mere',), [('Charlemaine', 'entity', 'CHI')], (',',), ('qui',), ('pukis',),
               ('tint',), [('France', 'entity', 'LOC')], ('et',), ('tot',), ('le',), [('Maine', 'entity', 'LOC')], ('.',)]
     self.assertEqual(tokens, target)
예제 #2
0
파일: test_tag.py 프로젝트: tnmsahu/cltk
 def test_tag_ner_str_list_french(self):
     """Test make_ner(), str, list."""
     text_str = """Berte fu mere Charlemaine, qui pukis tint France et tot le Maine."""
     ner_replacer = NamedEntityReplacer()
     tokens = ner_replacer.tag_ner_fr(input_text=text_str, output_type=list)
     target = [[('Berte', 'entity', 'CHI')], ('fu', ), ('mere', ),
               [('Charlemaine', 'entity', 'CHI')], (',', ), ('qui', ),
               ('pukis', ), ('tint', ), [('France', 'entity', 'LOC')],
               ('et', ), ('tot', ), ('le', ), [('Maine', 'entity', 'LOC')],
               ('.', )]
     self.assertEqual(tokens, target)
예제 #3
0
 def test_tag_ner_str_list_french(self):
     """Test make_ner(), str, list."""
     text_str = "Berte fu mere Charlemaine, qui pukis tint France et tot le Maine."
     ner_replacer = NamedEntityReplacer()
     tokens = ner_replacer.tag_ner_fr(input_text=text_str, output_type=list)
     target = [
         [("Berte", "entity", "CHI")],
         ("fu", ),
         ("mere", ),
         [("Charlemaine", "entity", "CHI")],
         (",", ),
         ("qui", ),
         ("pukis", ),
         ("tint", ),
         [("France", "entity", "LOC")],
         ("et", ),
         ("tot", ),
         ("le", ),
         [("Maine", "entity", "LOC")],
         (".", ),
     ]
     self.assertEqual(tokens, target)