The attribute tok-matches
takes a regular expression. When validating a given <m>
, a test will be made against each companion <tok>
(i.e., those <tok>
s that have the same ancestral <ana>
). The condition will be treated as true only if there is a match with the resolved value of every such <tok>
, and false if there is any nonmatch.
One of four tests for determining the truth value that will trigger the message in a <report>
or <assert>
Formal Definition
Defined at:
TAN-mor.rng
Used by: ~action-condition-attributes
Example 8.71. @tok-matches
<TAN-mor TAN-version="2018" id="tag:kalvesmaki.com,2014:tan-r-mor:eng:penn"> ......... <body> ......... <rule m-has-features="$"> <assert tok-matches="$">Only $ may be tagged as a dollar sign.</assert> </rule> <rule m-has-features="'' . ; :"> <report tok-matches="\w">Nothing marked as punctuation should have word characters.</report> </rule> </body> </TAN-mor>
Note | |
---|---|
Taken from eng.kalvesmaki.com,2014.2 |