You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the standard en-US dictionary, wrote is specified as a separate word form (like most of irregular verbs, I guess). Note that hunspell and its dictionaries are designed, first and foremost, as a spell-checking tool, not a full-fledged linguistic analysis package.
from hunspell import Hunspell
hunSpell = Hunspell()
print(hunSpell.stem('wrote'))#gives ('write', 'wrote')
With spylls, I used the code you gave at the comment section #19 (comment)
from spylls.hunspell import Dictionary
# en_US dictionary is distributed with spylls
# See docs to load other dictionaries
dictionary = Dictionary.from_files('en_US')
from spylls.hunspell.algo.capitalization import Type as CapType
for form in dictionary.lookuper.affix_forms('wrote', captype=CapType.NO):
print(form.stem))#only gives 'wrote'
Activity
zverok commentedon Jan 30, 2022
The possible implementation of stemming with Spylls is demonstrated in this discussion: #19 (comment)
I'll gladly accept a PR that will make it more convenient, but unfortunately don't have time to work on this myself
redstoneleo commentedon Oct 19, 2024
As I have tested with word
wrote
, it is not accuratezverok commentedon Oct 19, 2024
That just depends on the dictionary.
In the standard en-US dictionary,
wrote
is specified as a separate word form (like most of irregular verbs, I guess). Note that hunspell and its dictionaries are designed, first and foremost, as a spell-checking tool, not a full-fledged linguistic analysis package.redstoneleo commentedon Oct 20, 2024
I tested with https://github.com/cdhigh/chunspell
it worked as expected
zverok commentedon Oct 20, 2024
Please show which Hunspell dictionaries you have used with both, and what was the code you have tried.
redstoneleo commentedon Oct 21, 2024
For chunspell, by default you have the only en_US dictionaries available. --https://github.com/cdhigh/chunspell?tab=readme-ov-file#dictionaries
With spylls, I used the code you gave at the comment section #19 (comment)