Trmorph

From Apertium
Revision as of 14:26, 28 March 2011 by Francis Tyers (talk | contribs)
Jump to navigation Jump to search

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:

$ 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>$.