Difference between revisions of "Pattern-Action example"

From Apertium
Jump to navigation Jump to search
m (→‎Pattern: --> minor change in notation)
Line 67: Line 67:
* Authors (attribute <code>a</code>) from both elements have been ''merged''.
* Authors (attribute <code>a</code>) from both elements have been ''merged''.

Revision as of 10:29, 3 September 2011

Main article: Cross Model


<cross-action id="pattern-1" a="ebenimeli">
  <description>Pattern 1</description>
        <l>$lemmaA<v n="X"/></l>
        <r>$lemmaB<v n="Y"/></r>

    <e r="RL">

          <l>$lemmaA<v n="X"/></l>
          <r>$lemmaC<v n="Y"/></r>


Candidate elements

<!-- element in bilingual dictionary es-ca -->
<e a="author1">

<!-- element in bilingual dictionary ca-fr -->
<e r="RL" a="author2">


In the example shown above, the pair of elements are candidate elements to be crossed because the lemma coixí (pillow in English) for the common language (B) is the same in both.


<e r="RL" a="author1/author2">
    <l>almohada<s n="n"/><s n="f"/></l>
    <r>oreiller<s n="n"/><s n="m"/></r>
  • The restriction RL has been resolved automatically.
  • Authors (attribute a) from both elements have been merged.