Changes between Version 4 and Version 5 of NamedVariable
- Timestamp:
- Jan 18, 2013, 2:11:39 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NamedVariable
v4 v5 4 4 The variable valuation must be placed on a newline following the rule in following format: 5 5 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>}}} 7 7 8 8 For a variable, only the first following valuation applies. This enables sharing same variable names across the rules.[[BR]] … … 12 12 Example: 13 13 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''. 16 16 17 17 Named 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: 18 18 19 19 {{{ 20 $C1 [word and]$C220 $C1 (word and) $C2 21 21 ... 22 MATCH $C1 [tag] $C2[tag]22 MATCH $C1(tag) $C2(tag) 23 23 k1 k1 24 24 k2 k2