hunspell?_chenxiajian

From: chenxiajian1985 <chenxiajian1985_at_gmail.com>
Date: Wed Jun 22 2011 - 11:34:27 CEST

Hi
In my opinion, compare Aspell Ispell mySpell(hunspell) USpell Hspell Zemberek Voikko appleSpell

mySpell(hunspell): support hyphenation
USpell : Yiddish dont need hyphenation
Hspell : Hebrew dont need hyphenation
Zemberek: we have implemented it !
Voikko: we have implemented it !

so we can focus on mySpell(hunspell) to implement hyphenation. I notice that Hunspell support Hyphenation.

The hyphenator Hyphen needs one file:
Dic-tionary File with .DIC ex-ten-sion (e.g. hyph_en_us.dic)
To dis-tin-guish be-tween Hun-spell and Hyphen dic-tio-nar-ies, the Hyphen dic-tio-nary names start with 'hyph_' by con-ven-tion.

/usr/share/hyphen/hyph_es_AR.dic
/usr/share/hyphen/hyph_es_BO.dic
/usr/share/hyphen/hyph_es_CL.dic
/usr/share/hyphen/hyph_es_CO.dic
/usr/share/hyphen/hyph_es_CR.dic
/usr/share/hyphen/hyph_es_CU.dic
/usr/share/hyphen/hyph_es_DO.dic
/usr/share/hyphen/hyph_es_EC.dic
/usr/share/hyphen/hyph_es_ES.dic
/usr/share/hyphen/hyph_es_GT.dic
/usr/share/hyphen/hyph_es_HN.dic
/usr/share/hyphen/hyph_es_MX.dic
/usr/share/hyphen/hyph_es_NI.dic
/usr/share/hyphen/hyph_es_PA.dic
/usr/share/hyphen/hyph_es_PE.dic
/usr/share/hyphen/hyph_es_PR.dic
/usr/share/hyphen/hyph_es_PY.dic
/usr/share/hyphen/hyph_es_SV.dic
/usr/share/hyphen/hyph_es_US.dic
/usr/share/hyphen/hyph_es_UY.dic
/usr/share/hyphen/hyph_es_VE.dic



chen xiajian



发件人: Urmas
发送时间: 2011-06-14 22:02:23
收件人: abiword-dev
抄送:
主题: Re: chenxiajian_enchant_dict_hyphenationSuggest ?
 
From: "chenxiajian1985" <chenxiajian1985@gmail.com>
Subject: chenxiajian_enchant_dict_hyphenationSuggest ?
> I try to implement hyphenation using enchant. so I add one method in enchant.
> ENCHANT_MODULE_EXPORT (char **)
> enchant_dict_hyphenationSuggest (EnchantDict * dict, const char *const word,
> ssize_t len, size_t * out_n_suggs);
>
No, you'll need a separate object for doing hyphenation, something like:
EnchantHyph* enchant_broker_request_hyph(EnchantBroker*, const char *const lang);
to create an provider-dependant hyphenation object, and
char *enchant_hyph_hyphenate(EnchantHyph *hyphenator, const char *const word);
which would call a virtual method of "hyphenator" to obtain results;
>
> 2. what is the best way to encode hyphenation results from enchant
> now I used (char **) to save the hyphenation results:
> such as : the word "hyphenation" can be save as:
> "hy-phen-ation" "hyphen-ation"....
That's looks like terribly inefficient way, better just to return a string with embedded meta-characters (like '~' or control ones) in most desired and less desired breakpoints.
Received on Wed Jun 22 11:34:34 2011

This archive was generated by hypermail 2.1.8 : Wed Jun 22 2011 - 11:34:34 CEST