Difference between revisions of "Cross Model Elements"
Jump to navigation
Jump to search
Values for
(Article "Cross Model Elements") |
(Link to French page) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Eléments de modèle croisé|En français]] |
|||
''(Main article: [[Cross Model]])'' |
|||
{{main|Cross Model}} |
|||
== <code>cross-model</code> element == |
== <code>cross-model</code> element == |
||
Line 48: | Line 50: | ||
'''<e>''' |
'''<e>''' |
||
<p> |
<p> |
||
<l>lemmaA<s n="..."/>...<s n="..."/></l> |
<l>$lemmaA<s n="..."/>...<s n="..."/></l> |
||
<r>lemmaB<s n="..."/>...<s n="..."/></r> |
<r>$lemmaB<s n="..."/>...<s n="..."/></r> |
||
</p> |
</p> |
||
'''</e>''' |
'''</e>''' |
||
Line 55: | Line 57: | ||
'''<e''' r="RL"'''>''' |
'''<e''' r="RL"'''>''' |
||
<p> |
<p> |
||
<l>lemmaB<s n="n"/>...<s n="..."/></l> |
<l>$lemmaB<s n="n"/>...<s n="..."/></l> |
||
<r>lemmaC<s n="n"/>...<s n="..."/></r> |
<r>$lemmaC<s n="n"/>...<s n="..."/></r> |
||
</p> |
</p> |
||
'''</e>''' |
'''</e>''' |
||
'''</pattern>''' |
'''</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. |
|||
== <code>action-set</code> element == |
== <code>action-set</code> element == |
||
Line 71: | Line 71: | ||
<e> |
<e> |
||
<p> |
<p> |
||
<l>lemmaA<s n="n"/><s n="..."/>...<s n="..."/></l> |
<l>$lemmaA<s n="n"/><s n="..."/>...<s n="..."/></l> |
||
<r>lemmaC<s n="n"/><s n="..."/>...<s n="..."/></r> |
<r>$lemmaC<s n="n"/><s n="..."/>...<s n="..."/></r> |
||
</p> |
</p> |
||
</e> |
</e> |
||
Line 83: | Line 83: | ||
== Values for <code><s></code> element == |
== Values for <code><s></code> element == |
||
⚫ | |||
<!-- |
|||
⚫ | |||
<e> |
|||
* Constants are elements in lower-case. For example, <code>m</code>, <code>adj</code>, etc. |
|||
<p> |
|||
<r>$lemmaA<s n="adj"/></l> |
|||
<r>$lemmaB<s n="adj"/></r> |
|||
</p> |
|||
</e> |
|||
Use literals (as in <code><s n="adj"/></code>) to match exactly that element. |
|||
=== Variables === |
=== Variables === |
||
Line 92: | Line 98: | ||
There are two types of variables: |
There are two types of variables: |
||
* '''<code><v n="..."/></code> tag''': one <code><s></code> element. For example, <code><v n="cat"/></code> can refer to <code><s n="adj"/></code>. Value "adj" will be stored in variable "cat". |
|||
* '''<code><t n="..."/></code> tag''': is used to indicate a sequence of <code><s></code> elements. In this case, <code><t n="tail"/></code>, can refer to the sequence <code><s n="n"/><s n="m"/><s n="sg"/></code>. Sequence "n.m.sg" will be stored in variable "tail". |
|||
--> |
|||
Example: |
|||
<e> |
|||
<p> |
|||
<l>$lemmaA<v n="'''cat'''"/><t n="'''tailA'''"/></l> |
|||
<r>$lemmaB<v n="cat"/><t/></r> |
|||
</p> |
|||
</e> |
|||
If you are not using the value of <code><v...></code> or <code><t...></code>, do not define any <code>n</code> attribute, that is: |
|||
* '''<code><v/></code>''': 1 <code><s n="..."/></code> element. |
|||
* '''<code><t/></code>''': 0 or more <code><s n="..."/></code> element(s). |
|||
Example: |
|||
<e> |
|||
<p> |
|||
<l>$lemmaA<s n="n"/>'''<v/>'''<s n="sg"/></l> |
|||
<r>$lemmaB<s n="n"/>'''<t/>'''</r> |
|||
</p> |
|||
</e> |
|||
In the example above, <code><v/></code> might be either <code><s n="m"/></code>, <code><s n="f"/></code>, etc, but the value is not stored in a variable because it's not used in any other place in the cross action. |
|||
[[Category:Dixtools]] |
|||
[[Category:Documentation in English]] |
Latest revision as of 08:39, 6 October 2014
- Main article: Cross Model
Contents
cross-model
element[edit]
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[edit]
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[edit]
<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>
action-set
element[edit]
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[edit]
Literals[edit]
<e> <p> <r>$lemmaA</l> <r>$lemmaB</r>
</e>
Use literals (as in
) to match exactly that element.
Variables[edit]
There are two types of variables:
<v n="..."/>
tag: one<s>
element. For example,<v n="cat"/>
can refer to<s n="adj"/>
. Value "adj" will be stored in variable "cat".<t n="..."/>
tag: is used to indicate a sequence of<s>
elements. In this case,<t n="tail"/>
, can refer to the sequence
. Sequence "n.m.sg" will be stored in variable "tail".
Example:
<e> <p> <l>$lemmaA<v n="cat"/><t n="tailA"/></l> <r>$lemmaB<v n="cat"/><t/></r>
</e>
If you are not using the value of <v...>
or <t...>
, do not define any n
attribute, that is:
<v/>
: 1
element.<t/>
: 0 or more
element(s).
Example:
<e> <p> <l>$lemmaA<v/></l> <r>$lemmaB<t/></r>
</e>
In the example above, <v/>
might be either
,
, etc, but the value is not stored in a variable because it's not used in any other place in the cross action.