Is this 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" for 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 the word "civilization" fails, but when asked to suggest alternatives, enchant (or aspell?) suggests the very same word that it just failed to spell.
EDIT: Using this workaround
def spell(w) : return d.check(w) or w in d.suggest(w)
I can get more sensible answers from pyEnchant, but that seems like a hack to me. However, this doesn't seem to be a pyEnchant problem but rather something to do with aspell
itself:
echo "civilization" | aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)
& civilization 3 0: civilization, civilizations, civilization's
Or am I misreading the output here?
EDIT: After this question was closed, I've rephrased it more clearly in this thread.