This commit is contained in:
podiukov.iv
2026-04-18 21:10:44 +05:00
parent b5b744406c
commit c84bb64551
3 changed files with 19 additions and 1 deletions

9
NER.py Normal file
View File

@@ -0,0 +1,9 @@
import spacy
nlp = spacy.load("ru_core_news_lg")
text = "Добрый день, я, Сидоров Иван Иванович. Прошу перевести сто тысяч рублей Якову Петру Игнатьевичу."
doc = nlp(text)
for ent in doc.ents:
print(f"{ent.text} -> {ent.label_}")