21 lines
237 B
Python
21 lines
237 B
Python
import spacy
|
|
|
|
|
|
q= "Hast du beispiele für Mathe1?"
|
|
|
|
nlp=spacy.load('de_core_news_md')
|
|
d=nlp(q)
|
|
|
|
|
|
print(d.text)
|
|
|
|
print([t for t in d])
|
|
|
|
print([t.tag_ for t in d])
|
|
|
|
print([t.lemma_ for t in d])
|
|
|
|
print([spacy.explain(t.tag_) for t in d])
|
|
|
|
|