Re: chenxiajian_enchant_dict_hyphenationSuggest ?

From: Urmas <davian818_at_gmail.com>
Date: Tue Jun 14 2011 - 16:02:08 CEST

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 Tue Jun 14 16:02:16 2011

This archive was generated by hypermail 2.1.8 : Tue Jun 14 2011 - 16:02:16 CEST