python 3.x - How to properly find root verb using spacy? -
i want check if word root verb using spacy. can check if word is, instance, subject, this:
if word.dep == spacy.symbols.nsubj
i think checking if it's root verb:
if word.dep == spacy.symbols.root
but fails. can this:
if word.dep == 512817
or if word.dep_ == "root"
but both seem wrong. there way more analogous first example?
Comments
Post a Comment