Thank you, László

I'll try that! I was wondering how I'll access my dictionary. Maybe I'll
have to add it as a dictionary extension with a special locale (using a
special Variant)?
I'll have to use my own dictionary for now and figure out how to stay
compatible with the official dictionary for that language. Latter I would
try to merge the official dictionary (without morph annotation) with mine.

Thanks,
William


On Fri, Sep 25, 2009 at 12:00 PM, Németh László <nem...@openoffice.org>wrote:

> Hello,
>
> In fact, you can use the XML API of Hunspell over the isValid() and
> spell() methods of XSpellChecker UNO interface. It is already used by
> the thesaurus component for stemming and morphological generation (see
> http://qa.openoffice.org/issues/show_bug.cgi?id=19563).
>
> From the Hunspell manual (hunspell.3):
>
>   XML API
>       The  spell()  [isValid() of XSpellChecker] function  returns
> non-zero  for  the   "<?xml?>"   input
>       indicating the XML API support.
>
>       The  suggest() [spell() of XSpellChecker]  function stems,
> analyzes and generates the forms of the
>       input word, if it was added by one of the following "SPELLML"
> syntaxes:
>
>              <?xml?>
>              <query type="analyze">
>              <word>dogs</word>
>              </query>
>
>              <?xml?>
>              <query type="stem">
>              <word>dogs</word>
>              </query>
>
>              <?xml?>
>              <query type="generate">
>              <word>dog</word>
>              <word>cats</word>
>              </query>
>
>              <?xml?>
>              <query type="generate">
>              <word>dog</word>
>              <code><a>is:pl</a><a>is:poss</a></code>
>              </query>
>
>       The  outputs  of  the type="stem" query and the stem() library
> function
>       are the same. The output  of  the  type="analyze"  query  is  a
>  string
>       contained  a <code><a>result1</a><a>result2</a>...</code> element.
> This
>       element can be used in the second syntax of the type="generate"
>  query.
> .......
>
> Regards,
> László
>
>
>
> 2009/9/25 Thomas Lange - Sun Germany - ham02 - Hamburg <
> thomas.la...@sun.com>:
> >
> > Hi,
> >
> > William Colen wrote:
> >> Let me detail what I need:
> >> I have access to a Hunspell dictionary for pt-PT with morphological
> >> annotation. I'd like to access that morphological data to write a new
> >> Proofreader (grammar checker).
> >> That would be easier if I could access the OOo Hunspell wrapper.
> >> If that is not possible, I'll try to use FSA like LT did.
> >>
> >> Thanks,
> >> William
> >>
> >
> > Can't be done. There is no UNO API for that.
> >
> > Thomas
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@lingucomponent.openoffice.org
> > For additional commands, e-mail: dev-h...@lingucomponent.openoffice.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lingucomponent.openoffice.org
> For additional commands, e-mail: dev-h...@lingucomponent.openoffice.org
>
>

Reply via email to