Difference between revisions of "Morphological segmentation"

From Apertium
Jump to navigation Jump to search
(Created page with " In the apertium-kaz/.deps directory to get the segmented output: <pre> hfst-invert kaz.LR.lexc.hfst -o kaz.LR.lexc.hfst.inv hfst-compose-intersect -2 kaz.LR.hfst -1 kaz.LR....")
 
 
Line 1: Line 1:
   
   
In the apertium-kaz/.deps directory to get the segmented output:
+
In the <code>apertium-kaz/.deps</code> (or any [[Apertium Turkic]] language) directory to get the segmented output:
   
 
<pre>
 
<pre>

Latest revision as of 20:29, 18 June 2014


In the apertium-kaz/.deps (or any Apertium Turkic language) directory to get the segmented output:

hfst-invert kaz.LR.lexc.hfst -o kaz.LR.lexc.hfst.inv
hfst-compose-intersect -2 kaz.LR.hfst -1 kaz.LR.lexc.hfst.inv -o kaz.seg
hfst-invert kaz.seg | hfst-fst2fst -O -o kaz.segmenter 

$ echo "щеткадағы" | hfst-proc kaz.segmenter 
^щеткадағы/щетка>{D}{A}{G}{I}$

You can then feed this output through the script morph-to-lattice.py (change the 'style' option in the script to 0 to get Moses-style PLF output)