Reverse lemmatization #9656
-
For any given word, I would like to find all the inflected forms of that word. So I basically want to run the lemmatizing in reverse. E.g. if I input "drive" I would like a list of "driving, drove, driven, drives." Can I use spaCy to do this? Has anyone done something similar before? edit: Languages I'm interested in are Norwegian and Swedish. Mostly Norwegian right now. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
The focus for spacy is on analysis, not on generation, so the core spacy library doesn't offer this, but there are some third-party libraries that support this through custom extensions. I haven't used it myself, but one that looks promising for English in particular is lemminflect: https://spacy.io/universe/project/lemminflect |
Beta Was this translation helpful? Give feedback.
-
Which language is it? If you provide the language I think more specific clues will come 😉 Different morphologies are treate differently, depending on the language you might need an FST or just get away with a dictionary based solution. |
Beta Was this translation helpful? Give feedback.
The focus for spacy is on analysis, not on generation, so the core spacy library doesn't offer this, but there are some third-party libraries that support this through custom extensions. I haven't used it myself, but one that looks promising for English in particular is lemminflect: https://spacy.io/universe/project/lemminflect