Difference between revisions of "MTX format"
Jump to navigation
Jump to search
(Created page with "This page serves a reference to the MTX format. The MTX format describes features to be used by the Perceptron tagger. == Example == Here is an example of the basic outl...") |
|||
Line 45: | Line 45: | ||
# The feats section contains feature definitions |
# The feats section contains feature definitions |
||
# Each feature definition can contain many boolean predicates with <pred>, normal output with <out> and generation of many features from an array type with <out-many> |
# Each feature definition can contain many boolean predicates with <pred>, normal output with <out> and generation of many features from an array type with <out-many> |
||
== Operational explanation == |
|||
Features are generated for each word/subword/inflection group (hereafter referred to here as wordoids). Note that each lexical unit (as defined in [[Apertium stream format]]) can have many possible analyses and each analysis can be made up of many wordoids, each with a lemma and list of tags. |
|||
Each <feat> tag can generate zero, one or many features for each wordoid. |
|||
== Tag reference == |
== Tag reference == |
||
=== Boolean operators === |
|||
<and>, <not>, <or> |
|||
=== Arithmetic operators === |
|||
<add>, <sub> |
|||
=== Feature extraction === |
|||
=== Wordoid addressing === |
|||
=== Sets === |
|||
=== String operators === |
|||
=== Loops === |
|||
=== Macros === |
Revision as of 13:35, 22 August 2016
This page serves a reference to the MTX format. The MTX format describes features to be used by the Perceptron tagger.
Contents
Example
Here is an example of the basic outline of an MTX file to illustrate the structure and some common constructs:
<?xml version="1.0" ?>① <!DOCTYPE metatag [ <!ENTITY commondefns SYSTEM "commondefns.mtx">② ]> <!-- Comment -->③ <metatag> <coarse-tags tag="mytsx.tsx" />④ <beam-width val="10" />⑤ <defns>⑥ &commondefns;② <def-str name="plus" val="+" /> <def-macro name="foo"> ... </def-macro> ... </defns> <feats>⑦ <!-- Major tag (all wordoids) --> <feat>⑧ ... <pred>...</pred> <out> <macro name="foo"></macro> ... </out> <out-many>...</out-many> </feat> </feats> </metatag>
- The format is an XML format.
- So files can be included using XML entities as illustrated.
- And XML comments can be used.
- If you want to make use of coarse tags you can reference a TSX file using a relative file path.
- You can change the beam width of used in decoding with this tag.
- The defns section contains constants and macros.
- The feats section contains feature definitions
- Each feature definition can contain many boolean predicates with <pred>, normal output with <out> and generation of many features from an array type with <out-many>
Operational explanation
Features are generated for each word/subword/inflection group (hereafter referred to here as wordoids). Note that each lexical unit (as defined in Apertium stream format) can have many possible analyses and each analysis can be made up of many wordoids, each with a lemma and list of tags.
Each <feat> tag can generate zero, one or many features for each wordoid.
Tag reference
Boolean operators
<and>, <not>, <or>
Arithmetic operators
<add>,