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