Skip to content
Advertisement

Using NLTK and WordNet; how do I convert simple tense verb into its present, past or past participle form?

Using NLTK and WordNet, how do I convert simple tense verb into its present, past or past participle form?

For example:

I want to write a function which would give me verb in expected form as follows.

v = 'go'
present = present_tense(v)
print present # prints "going"

past = past_tense(v)
print past # prints "went"

Advertisement

Answer

I think what you’re looking for is the NodeBox::Linguistics library. It does exactly that:

print en.verb.present("gave")
>>> give
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement