Difference between revisions of "Omorfi"
Jump to navigation
Jump to search
TommiPirinen (talk | contribs) |
|||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOCD}} |
{{TOCD}} |
||
− | ''' |
+ | '''Omorfi''' (Open Morphology of Finnish) is a computational morphology of Finnish written using [[HFST]]. |
==Requirements== |
==Requirements== |
||
− | You will need [[ |
+ | You will need [[HFST]] installed, you can follow the instructions on the [[HFST]] page. |
==Download== |
==Download== |
||
+ | The following commands will download and prepare the build for OMorFi. |
||
− | You need to have both the morphology files (OMorFi) and the wordlist (Kotus sanalista). The SVN version of <code>kotus-sanalista</code> can be downloaded from [http://svn.gna.org/svn/omorfi/kotus-sanalista here], but requires Java and Saxon to compile the list, so a pre-compiled version will be used here. |
||
<pre> |
<pre> |
||
− | $ |
+ | $ git clone https://github.com/flammie/omorfi |
− | $ cd omorfi/ |
+ | $ cd omorfi/ |
+ | $ ./autogen.sh |
||
− | $ wget http://xixona.dlsi.ua.es/~fran/wordlists/kotus-sanalista-1a.xml |
||
+ | $ ./configure |
||
− | $ wget http://xixona.dlsi.ua.es/~fran/wordlists/kotus-sanalista.sfstlex |
||
</pre> |
</pre> |
||
+ | In case autogen.sh does not work, do report a bug (autoreconf -i should work just as well in the meantime). |
||
− | Edit the <code>omorfi/configure.ac</code> file and comment out the line <code>AC_CONFIG_AUX_DIR([config-aux])</code>. Then edit the file <code>omorfi/src/Makefile.am</code> and comment out the line <code>KOTUS_LEX = kotus-sanalista.sfstlex</code> (or make will overwrite the ones you just downloaded). |
||
⚫ | |||
− | <pre> |
||
− | $ aclocal |
||
− | $ automake -a |
||
− | $ autoconf |
||
− | $ ./configure --with-kotus-sanalista=kotus-sanalista-1a.xml |
||
− | </pre> |
||
+ | You need at least 1.5Gb RAM to compile Omorfi, or be willing to let your machine sit around trashing for some hours. |
||
⚫ | |||
<pre> |
<pre> |
||
Line 32: | Line 27: | ||
</pre> |
</pre> |
||
− | This |
+ | This will compile everything. |
+ | |||
+ | To prepare source code for new apertium language pair, use src/scripts/omor2apertium.sh... or just copy one from an existing pair, such as apertium-fin-eng. |
||
==Usage== |
==Usage== |
||
− | After compiling, you can test it with the <code> |
+ | After compiling, you can test it with the <code>hfst-lookup</code> program. |
− | |||
− | <pre> |
||
− | $ echo "kaikki ihmiset syntyvät vapaina ja tasavertaisina arvoltaan ja oikeuksiltaan." | fst-proc omorfi/src/omorfi.sfstc |
||
− | |||
− | ^kaikki/kaikki<noun><7><a><sg><nom>$ ^ihmiset/ihminen<noun><38><pl><acc>/ihminen<noun><38><pl><nom>$ |
||
− | ^syntyvät/syntyä<verb><52><j><act><pcpva><pl><acc>/syntyä<verb><52><j><act><pcpva><pl><nom>/syntyä<verb><52><j><act><indv><pres><pl3>$ |
||
− | ^vapaina/vapaa<noun><17><pl><ess>$ ^ja/*ja$ ^tasavertaisina/*tasavertaisina$ ^arvoltaan/arvo<noun><1><sg><abl><pl3>/arvo<noun><1><sg><abl><sg3>$ ^ja/*ja$ |
||
− | ^oikeuksiltaan/oikeus<noun><40><pl><abl><pl3>/oikeus<noun><40><pl><abl><sg3>$. |
||
− | </pre> |
||
==See also== |
==See also== |
||
Line 53: | Line 41: | ||
==External links== |
==External links== |
||
+ | |||
− | * [https://kitwiki.csc.fi/twiki/bin/view/KitWiki/OMorFiSFSTVersion#Installation OMorFi: Installation] |
||
− | * [ |
+ | * [http://code.google.com/p/omorfi Omorfi project site at google code] |
* [http://langtech.jrc.it/FSMNLP2008/m/Koskenniemi_invited_talk.pdf Overview of the HFST project (pdf)], esp. in relation to other FST technology |
* [http://langtech.jrc.it/FSMNLP2008/m/Koskenniemi_invited_talk.pdf Overview of the HFST project (pdf)], esp. in relation to other FST technology |
||
Latest revision as of 14:53, 2 June 2016
Omorfi (Open Morphology of Finnish) is a computational morphology of Finnish written using HFST.
Requirements[edit]
You will need HFST installed, you can follow the instructions on the HFST page.
Download[edit]
The following commands will download and prepare the build for OMorFi.
$ git clone https://github.com/flammie/omorfi $ cd omorfi/ $ ./autogen.sh $ ./configure
In case autogen.sh does not work, do report a bug (autoreconf -i should work just as well in the meantime).
Compilation[edit]
You need at least 1.5Gb RAM to compile Omorfi, or be willing to let your machine sit around trashing for some hours.
$ make
This will compile everything.
To prepare source code for new apertium language pair, use src/scripts/omor2apertium.sh... or just copy one from an existing pair, such as apertium-fin-eng.
Usage[edit]
After compiling, you can test it with the hfst-lookup
program.
See also[edit]
External links[edit]
- Omorfi project site at google code
- Overview of the HFST project (pdf), esp. in relation to other FST technology