Difference between revisions of "Trmorph"

From Apertium
Jump to navigation Jump to search
Line 8: Line 8:


You should have a directory now called <code>trmorph/</code>, switch into it, and run the following command:
You should have a directory now called <code>trmorph/</code>, switch into it, and run the following command:

<pre>
$ cd trmorph/
</pre>

Then do:


<pre>
<pre>

Revision as of 07:19, 29 March 2011

Trmorph is a GPL morphological analyser and generator for Turkish that can be compiled with HFST.

Installation

$ git clone http://www.let.rug.nl/coltekin/trmorph/trmorph.git

You should have a directory now called trmorph/, switch into it, and run the following command:

$ cd trmorph/

Then do:

$ FSTC=hfst make

This should build the transducer trmorph.a, now you need to turn that into a format suitable for use with hfst-proc

$ hfst-invert -i trmorph.a | hfst-fst2fst -O -o tr.automorf.hfst

If you want a generator, you can simply do:

$ hfst-fst2fst -O -i trmorph.a -o tr.autogen.hfst

Usage

You can use it, as with other HFST compatible transducers with hfst-proc:

$ echo "Römorkör, büyük tekneleri iterek veya çekerek manevra yapmalarına yardımcı olur. " | hfst-proc tr.automorf.hfst
^Römorkör/*Römorkör$, ^büyük/*büyük$ ^tekneleri/*tekneleri$ ^iterek/it<v><cv_erek>$ ^veya/veya<cnj>$ 
^çekerek/çek<v><cv_erek>$ ^manevra/*manevra$ 
^yapmalarına/yap<v><D_mA><n><pl><gen><3s><v><t_imp><2s>/yap<v><D_mA><n><pl><p2s><3s><v><t_imp><2s>/yap<v><VN_ma><pl><gen><3s><v><t_imp><2s>/yap<v><VN_ma><pl><p2s><3s><v><t_imp><2s>$ 
^yardımcı/*yardımcı$ ^olur/ol<v><t_aor><3s>/ol<v><t_aor><cv>$.