Thursday, September 16, 2010

Re: Myspell -> Hunspell plan?

Dominique Pelle wrote:

> Vim-7.3 currently creates spelling dictionaries from Myspell dictionaries.
> I am wondering whether there is any plan to support Hunspell dictionaries.
>
> The French dictionary at http://www.dicollecte.org/download.php?prj=fr states:
>
> === [ fr] ===
> Ces dictionnaires pour Myspell ne seront plus mis à jour, Myspell ayant
> été remplacé par Hunspell dans la plupart des applications.
> =========
>
> Which means in English:
> =========
> These dictionaries for Myspell won't be kept up-to-date, Myspell
> being replaced by Hunspell in most applications.
> =========
>
> It's a pity if we can't use the latest dictionaries in Vim anymore.
> I have no idea how much work is involved in supporting Hunspell.
>
> When trying to run :mkspell on the Hunspell French dictionary,
> available at...
>
> http://www.dicollecte.org/download/fr/hunspell-fr-moderne-v3.8.zip
>
> ... Vim reports the following messages:
>
> Unrecognized or duplicate item in fr-moderne.aff line 10: WORDCHARS
> Unrecognized or duplicate item in fr-moderne.aff line 98: KEY
> Unrecognized or duplicate item in fr-moderne.aff line 100: ICONV
> ...snip...
> Unrecognized or duplicate item in fr-moderne.aff line 135: OCONV
> Unrecognized or duplicate item in fr-moderne.aff line 154: BREAK
> Unrecognized or duplicate item in fr-moderne.aff line 155: BREAK
> Reading dictionary file fr-moderne.dic ...
> First duplicate word in fr-moderne.dic line 3815: V
> 392 duplicate word(s) in fr-moderne.dic
> Compressing word tree...
> Compressed 4390813 of 4735831 nodes; 345018 (7%) remaining
> Compressed 313845 of 391932 nodes; 78087 (19%) remaining
> Writing spell file fr.utf-8.spl ...
> Done!
> Estimated runtime memory use: 2116435 bytes
>
> It creates a dictionary for Vim, but when doing :spelldump to see
> words in the created dictionay, I see a lot of junk (words beginning
> with 0, words with /= at the end for example) so Vim does not
> understand Hunspell files.
>
> =====================
> # file: /home/pel/.vim/spell/fr-moderne.utf-8.spl
> 0ampère
> 0becquerel
> 0calorie
> ...snip...
> µm/=
> µmol/=
> µs/=
> µvar/=
> µΩ/=
> Ã…/=
> Épinay-sur-Seine
> États-Unis
> ÃŽle-de-France
> Île-du-Prince-Édouard
> ÃŽles-de-la-Madeleine
> Ω/=
> =====================
>
> The help file spell.txt has notes about WORDCHARS, KEY, BREAK
> which don't seem essentials but there is no note about ICONV
> and OCONV in Vim's help. I see some doc here:
> http://manpages.ubuntu.com/manpages/lucid/man4/hunspell.4.html

Hunspell uses the same kind of files, but adds more options. Vim should
be able to use most of the Hunspell files, with some modifications.

I don't know what the ICONV and OCONV items mean.
The page you refer to simply say input and output conversion, without
explaining what that means. It's a common problem for Hunspell that
it's largely undefined how it works. You may need to look at the source
code...

For the dictionaries, it's usually best to get them from the OpenOffice
site, as that's what is downloaded automatically, thus should be kept
up-to-date.

--
You are not really successful until someone claims he sat
beside you in school.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment