Difference between revisions of "Talk:Constraint-based lexical selection module"

From Apertium
Jump to navigation Jump to search
Line 1: Line 1:
==rule formats==
==rule formats==

Note: Felipe doesn't like "skip".


;1
;1
Line 33: Line 35:
</or>
</or>
</rule>
</rule>
</pre>

;3
<pre>
<rule>
<remove-from lemma="règim" tags="n.*">
<translation lemma="diet" tags="n.*"/>
</remove-from>
<pattern>
<or>
<pattern-item lemma="nazi" tags="adj.*"/>
<pattern-item lemma="totalitari" tags="adj.*"/>
<pattern-item lemma="feixista" tags="adj.*"/>
<pattern-item lemma="franquista" tags="adj.*"/>
<pattern-item lemma="militar" tags="adj.*"/>
<pattern-item lemma="fiscal" tags="adj.*"/>
</or>
</pattern>
</rule>

<rule c="la dona dels seus somnis">
<select-for lemma="dona" tags="n.*">
<translation lemma="wife" tags="n.*"/>
</select>
<pattern>
<pattern-item lemma="de" tags="pr.*"/>
<pattern-item lemma="*" tags="det.pos.*"/>
<pattern-item lemma="somni" tags="n.*"/>
</pattern>
</rule>

</pre>
</pre>

Revision as of 10:32, 18 November 2011

rule formats

Note: Felipe doesn't like "skip".

1
  <rule>
    <remove lemma="règim" tags="n.*">
      <acception lemma="diet" tags="n.*"/>
    </remove>
    <or>
      <skip lemma="nazi" tags="adj.*"/>
      <skip lemma="totalitari" tags="adj.*"/>
      <skip lemma="feixista" tags="adj.*"/>
      <skip lemma="franquista" tags="adj.*"/>
      <skip lemma="militar" tags="adj.*"/>
      <skip lemma="fiscal" tags="adj.*"/>
    </or>
  </rule>
2
  <rule>
    <remove lemma="règim" tags="n.*">
      <acception lemma="diet" tags="n.*"/>
    </remove>
    <or>
      <pattern lemma="nazi" tags="adj.*"/>
      <pattern lemma="totalitari" tags="adj.*"/>
      <pattern lemma="feixista" tags="adj.*"/>
      <pattern lemma="franquista" tags="adj.*"/>
      <pattern lemma="militar" tags="adj.*"/>
      <pattern lemma="fiscal" tags="adj.*"/>
    </or>
  </rule>
3
  <rule>
    <remove-from lemma="règim" tags="n.*">
      <translation lemma="diet" tags="n.*"/>
    </remove-from>
    <pattern>
      <or>
        <pattern-item lemma="nazi" tags="adj.*"/>
        <pattern-item lemma="totalitari" tags="adj.*"/>
        <pattern-item lemma="feixista" tags="adj.*"/>
        <pattern-item lemma="franquista" tags="adj.*"/>
        <pattern-item lemma="militar" tags="adj.*"/>
        <pattern-item lemma="fiscal" tags="adj.*"/>
      </or>
    </pattern>
  </rule>

  <rule c="la dona dels seus somnis">
    <select-for lemma="dona" tags="n.*">
      <translation lemma="wife" tags="n.*"/>
    </select>
    <pattern>
      <pattern-item lemma="de" tags="pr.*"/>
      <pattern-item lemma="*" tags="det.pos.*"/>
      <pattern-item lemma="somni" tags="n.*"/>
    </pattern>
  </rule>