TimKam / compound-word-splitter

A compound word splitter for Python
MIT License
48 stars 15 forks source link

ModuleNotFoundError: No module named 'enchant' #8

Open dcsanx opened 4 years ago

dcsanx commented 4 years ago

I get this error on trying to use the module:

>>> import splitter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dcollier/dev/ds/ds-databricks/src/notebooks/intentris/venv/lib/python3.7/site-packages/splitter/__init__.py", line 1, in <module>
    from .compound_word_splitter import split
  File "/Users/dcollier/dev/ds/ds-databricks/src/notebooks/intentris/venv/lib/python3.7/site-packages/splitter/compound_word_splitter.py", line 3, in <module>
    import enchant, sys
ModuleNotFoundError: No module named 'enchant'
dcsanx commented 4 years ago

▶ pip install pyenchant

does seem to fix it, if this is a dependency can that be made more explicit? I had to google around to find why pip install enchant actually is now pyenchant

https://superuser.com/questions/1501146/in-python-i-get-the-error-no-module-named-enchant

dcsanx commented 4 years ago

but it seems pyenchant is not maintained, I came across hunspell as an alternative which is used by chrome, so should be maintained.

https://github.com/blatinier/pyhunspell

although elsewhere I've used SpellChecker

TimKam commented 4 years ago

Thanks for reporting this. I think it makes sense to switch.