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