The original function in wntools.py suffered from at
least one bug: try morphy('days', collect=1) and it
returned nothing. The following version 'newmorphy' is
a half rewrite and it corrects the problem.
Found a stupid bug: in the case of collect=0 the original
form instead of the modified word ('subst') is returned if
it's found in the dictionary. The file newmorphy.py is
modifed and re-attached here.
BTW if you want you can replace morphy() with newmorphy() in
wntools.py entirely.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
new version of morphy function
new morphy function (can replace morphy in wntools.py)
Logged In: YES
user_id=555776
Found a stupid bug: in the case of collect=0 the original
form instead of the modified word ('subst') is returned if
it's found in the dictionary. The file newmorphy.py is
modifed and re-attached here.
BTW if you want you can replace morphy() with newmorphy() in
wntools.py entirely.