Difference between revisions of "Extract"

From Apertium
Jump to navigation Jump to search
m
Line 3: Line 3:
There are two versions of '''extract''', the first version supports Unicode (although not in paradigm names), the second doesn't support Unicode, but supports a system of constraints. For Apertium use, I recommend the first version. Any constraints can be applied using the [[constraint grammar]].
There are two versions of '''extract''', the first version supports Unicode (although not in paradigm names), the second doesn't support Unicode, but supports a system of constraints. For Apertium use, I recommend the first version. Any constraints can be applied using the [[constraint grammar]].


==Example paradigm==
==Paradigms==

;Apertium

<pre>
<pardef n="wol/f__n">
<e>
<p>
<l>f</l>
<r>f<s n="n"/><s n="sg"/>
</p>
</e>
<e>
<p>
<l>ves</l>
<r>f<s n="n"/><s n="pl"/>
</p>
</e>
</pardef>
</pre>


;Extract
;Extract

Revision as of 07:32, 30 September 2008

The extract tool is a program for matching word forms (for example from a corpus) to lemmata and paradigms. The paradigms in extract are not the same as Apertium paradigms in that they can contain both "inclusions" and "exclusions" for matching purposes. For example, if you wanted to match nouns but not verbs in English, you might write an extract paradigm saying "root + s", but not "root + ing".

There are two versions of extract, the first version supports Unicode (although not in paradigm names), the second doesn't support Unicode, but supports a system of constraints. For Apertium use, I recommend the first version. Any constraints can be applied using the constraint grammar.

Example paradigm

Extract
paradigm wol_f__n = 
        x+"f"
        { x+"ves" & ~(x+"ing")} ;

External links