GNU bug report logs -
#17742
Support for enchant?
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Tue, 10 Jun 2014 00:02:02 UTC
Severity: wishlist
Done: Reuben Thomas <rrt <at> sc3d.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Tue, 13 Dec 2016 00:53:47 +0000
> Cc: 17742 <at> debbugs.gnu.org
>
> Thanks. Note that this should not only list the installed
> dictionaries, but also deduce the suitable values of CASECHARS and
> NOT-CASECHARS for each dictionary.
>
> Thanks for the tip.
>
> In fact, it proves to be impossible to deduce suitable values currently, so I set defaults. Enchant will need
> changes to support this (unless one finds the provider for each dictionary and uses ispell.el's existing
> back-end-specific code, but this is a nasty solution). This simple solution gets the correct encoding at least
> (Enchant is always utf8), and hence fixes the misalignment errors.
> [...]
> +(defun ispell-find-enchant-dictionaries ()
> + "Find Enchant's dictionaries, and record in `ispell-enchant-dictionary-alist'."
> + (let* ((dictionaries
> + (split-string
> + (with-temp-buffer
> + (ispell-call-process ispell-program-name nil t nil "-D")
> + (buffer-string))))
> + (found
> + (mapcar #'(lambda (lang)
> + `(,lang "[[:alpha:]]" "[^[:alpha:]]" "['.’-]" t nil nil utf-8))
> + dictionaries)))
I'm sorry, I don't think this is good enough for any language but
English. I looked at a few Hunspell dictionaries I have, and almost
all of them have some non-[:alpha:] characters in what becomes
CASECHARS when ispell.el sets up itself for that dictionary. So this
seems to be really important for correct spell-checking of almost any
language. Moreover, these settings must be in sync with the words in
the dictionary, so it isn't just some general setting determined by
the dictionary's language, it must come from the dictionary or its
authors.
I understand that Enchant doesn't yet support these features, but in
that case we must provide our users with some way of customizing these
settings, we cannot silently use defaults that are most probably
inappropriate, even if they are 90% correct.
Do the dictionaries used by Enchant really fail to provide this
information? Aren't they Aspell dictionaries or similar?
This bug report was last modified 7 years and 334 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.