Word Inflections

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Word Inflections

h4xiao
Hi,

Does anyone know if it is possible to use Hunspell to generate the
inflections of a root word base on a given set of rules?

I've looked into the source code for Affix Manager (expand_rootword
function), thought that might help me, but I'm not too sure on how to use
it.

I also came up with an idea of using unmunch, for example: discarding all
the rules in the .dic except the ones that I want, and then apply unmunch.
However I hit a problem when trying to unmunch more complicated
dictionaries (like Hungarian, Arabic).

If anyone has any ideas, it doesn't have to use Hunspell, as long it is
using the OpenOffice's dictionaries for inflections. Your help is greatly
appreciated.

Best Regards,
--Han


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Word Inflections

Németh László-2
Hi,

Try the wordforms script in the Hunspell distribution (it needs
system-wide Hunspell installation). It is not a full solution, but
useful for checking the dictionaries:

$ hunspell/src/tools/wordforms hu.aff hu.dic kutya
kutya
kutyáméiban
kutyaiéira
kutyaképp
kutyáitokéiul
kutyájáét
kutyait
kutyátlaníttatási
kutyáidkor
kutyámékért
kutyásíthat
kutyásodó
kutyáitoké
kutyájukéról
kutyázható
kutyáméiért
kutyátokét
kutyáink
kutyátokba
kutyánkéhoz
...

You can use the program "analyze" to generate word forms, too:

$ echo man mice | hunspell/src/tools/analyze en.aff en.dic /dev/stdin
generate(man, mice) = men

See also generate() in

$ man 3 hunspell

(http://sourceforge.net/projects/hunspell/files/Hunspell/Documentation/hunspell3.pdf/download)

The first method doesn't handle the second suffixes.

Best regards,
László

2010/7/22  <[hidden email]>:

> Hi,
>
> Does anyone know if it is possible to use Hunspell to generate the
> inflections of a root word base on a given set of rules?
>
> I've looked into the source code for Affix Manager (expand_rootword
> function), thought that might help me, but I'm not too sure on how to use
> it.
>
> I also came up with an idea of using unmunch, for example: discarding all
> the rules in the .dic except the ones that I want, and then apply unmunch.
> However I hit a problem when trying to unmunch more complicated
> dictionaries (like Hungarian, Arabic).
>
> If anyone has any ideas, it doesn't have to use Hunspell, as long it is
> using the OpenOffice's dictionaries for inflections. Your help is greatly
> appreciated.
>
> Best Regards,
> --Han
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]