Reputation: 45
For example, if the following sentence is given They have been swimming for more than an hour
the function should return perfect progressive.
Upvotes: 1
Views: 110
Reputation: 22694
It's a little old library but it will be a good intro for you.
https://www.nodebox.net/code/index.php/Linguistics
print en.verb.present_participle("be")
>>> being
print en.verb.present("gave")
print en.verb.present("gave", person=3, negate=False)
>>> give
>>> gives
print en.verb.tense("was")
>>> 1st singular past
Upvotes: 0