Changes between Version 4 and Version 5 of NamedVariable


Ignore:
Timestamp:
Jan 18, 2013, 2:11:39 PM (8 years ago)
Author:
Vojtěch Kovář
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NamedVariable

    v4 v5  
    44The variable valuation must be placed on a newline following the rule in following format:
    55
    6 {{{$nameOfVariable[}}}[wiki:Attribute attribute]]{{{: <list of values (constraints) separated by white space>}}}
     6{{{$nameOfVariable(}}}[wiki:Attribute attribute]{{{): <list of values (constraints) separated by white space>}}}
    77
    88For a variable, only the first following valuation applies. This enables sharing same variable names across the rules.[[BR]]
     
    1212Example:
    1313
    14 {{{$CONJUCTION[word]: for and nor but or yet so}}} -- will match any of the listed words.[[BR]]
    15 {{{$NOTNO[word not]: no}}} -- will match any word except of ''no''.
     14{{{$CONJUCTION(word): for and nor but or yet so}}} -- will match any of the listed words.[[BR]]
     15{{{$NOTNO(word not): no}}} -- will match any word except of ''no''.
    1616
    1717Named variables can be also used for interconnecting tags. Imagine you want create a rule for matching a coordination consisting either of two substantives or two adjectives (but not mixed substantive and adjective). This can be easily done by using the MATCH keyword as shown on the following example:
    1818
    1919{{{
    20 $C1 [word and] $C2
     20$C1 (word and) $C2
    2121...
    22 MATCH $C1[tag] $C2[tag]
     22MATCH $C1(tag) $C2(tag)
    2323k1 k1
    2424k2 k2