We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Никогда не находит фамилию, когда она указана вначале, пример:
from natasha import ( Segmenter, MorphVocab, PER, NamesExtractor, NewsNERTagger, NewsEmbedding, Doc ) emb = NewsEmbedding() segmenter = Segmenter() morph_vocab = MorphVocab() ner_tagger = NewsNERTagger(emb) names_extractor = NamesExtractor(morph_vocab) text = "Это проверка Абдурахмановой Натальи Петровны на простом примере." doc = Doc(text) doc.segment(segmenter) doc.tag_ner(ner_tagger) for span in doc.spans: span.normalize(morph_vocab) for span in doc.spans: if span.type == PER: span.extract_fact(names_extractor) print({_.normal: _.fact.as_dict for _ in doc.spans if _.fact})
Результат:
{'Натальи Петровны': {'first': 'Натальи', 'last': 'Петровны'}}
Фамилию не нашла, как Наташу научить ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Никогда не находит фамилию, когда она указана вначале, пример:
Результат:
Фамилию не нашла, как Наташу научить ?
The text was updated successfully, but these errors were encountered: