3

I use pyenchant to auto-correct words, e.g.

import enchant
myDic = enchant.Dict('en_EN')
print myDict.check('foo')

Problem: I get the following error message from enchant, though it does not crash

** (process:24563): CRITICAL **: enchant_is_title_case: assertion `word && *word' failed

** (process:24563): CRITICAL **: enchant_is_all_caps: assertion `word && *word' failed
ezdazuzena
  • 6,120
  • 6
  • 41
  • 71

1 Answers1

2

Found the answer in a discussion in the pyenchant GIT repository:

It was an empty line (or something that is interpret as such) in my personal dictionary. I have mine in ~/.config/enchant/en_EN.dic

Removing the empty line solved the problem.

ezdazuzena
  • 6,120
  • 6
  • 41
  • 71
  • Yes, I was source-diving to find if the PWL file (personal word list) can have comments (it can, line must start with `#`, and it must be in the first column). If you need a line to separate the file logically, just add an empty comment line. – Tomasz Gandor Feb 01 '14 at 05:43