Re: Re: chenxiajian_enchant_dict_hyphenationSuggest ?

From: chenxiajian1985 <chenxiajian1985_at_gmail.com>
Date: Mon Jun 20 2011 - 04:27:51 CEST

Hi, Pradeeban

I have implemented some of it following the advices of Urmas
But I have some problem while reading the source code of enchant so it takes time

1. Some dict provide the function we need
  ispell_dict_suggest: provided by spell
   uspell_dict_suggest: we implemented it
   voikko_dict_suggest: we implemented it
   zemberek_dict_suggest : we implemented it
  
but none of them provide the information about hyphenation, so I have some problem to implement hyphenation using the dict.

there is the related hyphen project at
http://sourceforge.net/projects/hunspell/files/Hyphen/ which includes an
example.c for sample hyphenation. This "hyphen" is used by LibreOffice,
OpenOffice.org and Scribus for their hyphenation.

but since it is based on a rather limited algortihm (and there are
issues in OOo/LO) its quality of hyphenation is poor for languages with
long coumpounded words. Especially in case of ambiguous words.


Is there some imformation that can be used for hyphenation using hunspell or aspell?


Best Regard~

chenxiajian



å‘件人: Kathiravelu Pradeeban
å‘é€æ—¶é—´ï¼š 2011-06-18 22:37:39
收件人: chenxiajian1985
抄é€ï¼š abiword-dev
主题: Re: chenxiajian_enchant_dict_hyphenationSuggest ?
 
Hi Chen,
As you discussed with me during our last chat, have you implemented
this? Can you pls send the enchant specific code that you have
implemented as a patch so that I can have a look?
Can you also pls send a quick update of your progress to the mailing
list upto now? We have been discussing over gtalk and personal mail.
So a higher level update to the group would be great to see how far we
have gone against the timeline that we have initially come up.
We will also need a quick chat to ensure that we are on the track.
Thank you.
Regards,
Pradeeban.
On Tue, Jun 14, 2011 at 7:32 PM, Urmas <davian818@gmail.com> wrote:
> 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.
--
Kathiravelu Pradeeban.
Software Engineer.
WSO2 Inc.
Blog: [Llovizna] http://kkpradeeban.blogspot.com/
Received on Mon Jun 20 04:27:57 2011

This archive was generated by hypermail 2.1.8 : Mon Jun 20 2011 - 04:27:57 CEST