Skip to content
Advertisement

SpaCy NLP- Detect the verb form

As far as I know that we can get the v1 form of a verb using

word.lemma_

I wanted to know is their a way in which we can get the form of the verb like:

swims it should output v4

Is their way to do that using SpaCy or any other lib and if there is then please give a link to that command

Advertisement

Answer

There are 6 verb forms available in spacy:

VB  --  verb, base form
VBD  --  verb, past tense
VBG  --  verb, gerund or present participle
VBN  --  verb, past participle
VBP  --  verb, non-3rd person singular present
VBZ  --  verb, 3rd person singular present

This is what you can get by calling word.tag_. However, I don’t know how they relate to your v1 or v4. To find all tags just call:

for label in nlp.get_pipe("tagger").labels:
    print(label, " -- ", spacy.explain(label))
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement