aspell - Python enchant suggests word that it can't check? -
is not odd?
python 3.2.3 (default, feb 1 2013, 20:24:16) [gcc 4.2.1 (apple inc. build 5666) (dot 3)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import enchant >>> d = enchant.dict("en_us") >>> d.check("house") true >>> d.check("civilization") false >>> d.suggest("civilization") ['civilization', 'civilizations', "civilization's"] >>> d.provider <enchant: aspell provider> >>> d.tag 'en_us' >>> enchant.list_languages() ['de', 'de_at', 'de_ch', 'de_de', 'en', 'en_ca', 'en_gb', 'en_us']
so basically, spell-checking word "civilization" fails, when asked suggest alternatives, enchant (or aspell?) suggests same word failed spell.
edit: using workaround
def spell(w) : return d.check(w) or w in d.suggest(w)
i can more sensible answers pyenchant, seems hack me. however, doesn't seem pyenchant problem rather aspell
itself:
echo "civilization" | aspell -a @(#) international ispell version 3.1.20 (but aspell 0.60.6.1) & civilization 3 0: civilization, civilizations, civilization's
or misreading output here?
edit: after question closed, i've rephrased more in this thread.
Comments
Post a Comment