lang.morph_en module

lang.morph_en module

lang.morph_en module

Contains the variations() function for expanding an English word into multiple variations by programatically adding and removing suffixes.

Translated to Python from the com.sun.labs.minion.lexmorph.LiteMorph_en class of Sun’s Minion search engine.

whoosh.lang.morph_en.variations(word)

Given an English word, returns a collection of morphological variations on the word by algorithmically adding and removing suffixes. The variation list may contain non-words (e.g. render -> renderment).

>>> variations("pull")
set(['pull', 'pullings', 'pullnesses', 'pullful', 'pullment', 'puller', ... ])