Difference between revisions of "Extract"

From Apertium
Jump to navigation Jump to search
m (libghc6-regex-compat-dev note)
Line 2: Line 2:
   
 
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]].
  +
  +
'''Note:''' on Debian/Ubuntu, you will need to install the <code>libghc6-regex-compat-dev</code> package.
   
 
==Example paradigm==
 
==Example paradigm==

Revision as of 11:26, 5 April 2009

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.

Note: on Debian/Ubuntu, you will need to install the libghc6-regex-compat-dev package.

Example paradigm

Extract

The lemma is formed by adding "f" to the stem, the plural is formed by adding "ves" to the stem, and adding "fing" to the stem is forbidden.

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

External links