Quote:
Originally Posted by GrannyGrump
OCR VILLAINS:
|
I had a look at the documentation for the Hunspell library, which appears to have been written by a programmer who does his taxes in binary, and found out that it's possible to add custom letter replacements to get betters spelling suggestions.
Replacements need to be defined in the affix file (e.g.
en_US.aff for US English), which is a plain text file that can be edited with a programmer's editor, e.g. Notepad ++.
The format is as follows
Code:
REP {number of following entries}
REP {OLD} {NEW}
For example the original replacement section in
en_US.aff looks like this:
Code:
REP 94
REP nt n't
...
...
REP shun tion
REP shun sion
REP shun cion
Based on your OCR villains list, I've created a custom list, added it after the last entry and updated the replacement count to
REP 127 (94 existing entries + 33 new ones):
With this change in place, the first suggestion for "ahnost" is no longer stenost, but almost and the suggestion for "hke" is like instead of hike.
If you want to test my modified file:
1. Go to C:\Program Files\Sigil\hunspell_dictionaries
2. Create a backup copy of en_US.aff.
3. Overwrite
en_US.aff with the attached version. (You'll need to confirm a system warning.)