Arabic spellchecking not working
ar_test.aff
SET UTF-8
ar_test.dic
قفا
نبك
من
ذكرى
حبيب
ومنزل
test.txt
قفا نبكيان من ذكرى حبيبن وأحمدييي
$ hunspell -d ./ar_test -l test.txt
قفا
نبكيان
من
ذكرى
حبيبن
وأحمديي
Expected:
نبكيان
حبيبن
وأحمدييي
I'm not sure that I understand the problem. Is there a single line in file ar_test.aff? Are there 6 lines in the dictionary? Or do you use a fuller dictionary?
The problem is that I tried using hunspell-ar package and it didn't work. The ar_test.aff and ar_test.dic files are my attempt to replicate a minimal working example for the problem.
It seems something is wrong with your setup. Which hunspell do you use? Which version of hunspell-ar did you take? What is the output of
hunspell -d ./ar_test -l test.txt -D
I tested in recent LibreOffice and recent hunspell, they report the first two word that you listed as expected.
Hunspell v1.7.2
Here is the output:
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/user/.openoffice.org/3/user/wordbook:/home/user/.openoffice.org2/user/wordbook:/home/user/.openoffice.org2.0/user/wordbook:/home/user/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
./ar_test
/usr/share/hunspell/en_US-large
/usr/share/hunspell/en_US
/usr/share/hunspell/ar
/usr/share/myspell/dicts/en_US-large
/usr/share/myspell/dicts/en_US
LOADED DICTIONARY:
././ar_test.aff
././ar_test.dic
test.txt: قفا
test.txt: نبكيان
test.txt: من
test.txt: ذكرى
test.txt: حبيبن
test.txt: وأحمدييي
Can't open -D.
Last line seems to be a bug in hunspell.