bjascob / LemmInflect

A python module for English lemmatization and inflection.
MIT License
258 stars 25 forks source link

Derivational Morphemes #8

Open usbader opened 3 years ago

usbader commented 3 years ago

Hi all,

It would be great to have arrival from arrive. I checked the following function, but it did not return arrival

getAllInflections('arrive') {'VBD': ('arrived',), 'VBG': ('arriving',), 'VBZ': ('arrives',), 'VB': ('arrive',), 'VBP': ('arrive',)}

bjascob commented 3 years ago

arrival is a noun but arrive is a verb so one can't be an inflection of the other. The base Lexicon does have nominalization and nominalization_of so I might be able to include some functionality for finding related words. However, I think nltk already has functions for this. Check nltk's derivationally_related_forms() for lemmas and see if it fits your needs.

usbader commented 3 years ago

Awesome! I am really looking forward to checking your enhancement.

usbader commented 3 years ago

This function does help, but I need to filter out unrelated words from it as you can see from the following list. ['comer', 'coming', 'arriver', 'arrival']

OmriPi commented 2 years ago

Is it supposed to be possible to convert between adverb->adjective->noun? For example "easily"->"easy" etc. I tried but it's not working for me, it just returns "easily".

bjascob commented 2 years ago

No. The library if for Lemmatization and Inflection only.