Cross Model Elements

From Apertium
Revision as of 18:59, 11 July 2007 by Ebenimeli (talk | contribs)
Jump to navigation Jump to search

(Main article: Cross Model)

cross-model element

cross-model element is a set of cross actions (cross-action elements).

<!DOCTYPE cross-model SYSTEM "crossmodel.dtd">
<cross-model>
  <cross-action id="pattern-1" a="author">
  ...
  </cross-action>
  <cross-action id="pattern-2" a="author">
  ...
  </cross-action>
  ...
  <cross-action id="pattern-n" a="author">
  ...
  </cross-action>
</cross-model>

cross-action element

Each cross actions consists of a pair (pattern,action-set).

<cross-action id="pattern-1" a="author">
  <description>Cross action 1</description>
  <pattern>
    ...
  </pattern>
  <action-set>
    <action>
      ...
    </action>
    ...
    <action>
      ...
    </action>
  </action-set>
</cross-action>

pattern element

<pattern>
  <!-- Element in bilingual dictionary AB-->
  <e>
    <p>
      <l>lemmaA...</l>
      <r>lemmaB...</r>

  </e>
  <!-- Element in bilingual dictionary BC-->
  <e r="RL">
    <p>
      <l>lemmaB...</l>
      <r>lemmaC...</r>

  </e>
</pattern>
  • The lemmas are not taken into account (you could write anything else in there). Only candidate elements, that is, elements that can be crossed (with coinciding lemmaB), will be processed.

action-set element

The action-set element is a list of actions to be performed when a pair of candidate elements matches the pattern.

<action-set>
  <action>
    <e>
      <p>
        <l>lemmaA...</l>
        <r>lemmaC...</r>

    </e>
  </action>
  <action>
  ...
  </action>
</action-set>

Values for <s> element