The element assert
names a pattern that, if found to be false in any <m>
in a dependent TAN-LM file, will return the enclosed message upon validation of the dependent file, along with an error or warning. Modeled on Schematron <report>
.
Formal Definition
~test-pattern
Used by: ~TAN-R-mor-body
Caution | |
---|---|
|
The element category
groups a set of features that share a common grammatical trait such as gender, number, etc.
Formal Definition
~ed-stamp
?, (~inclusion
| (<comment>
* & (<feature>
,<feature>
+)))
Used by: ~category-list
The element feature
names, through its IRI + name pattern, a grammatical feature or concept (e.g., plural, subjunctive, 1st person) that is part of a language. In the context of <feature>
a @code
is always included. The first <feature>
of a <category>
never has @code
, and refers to the grammatical feature that characterizes the category.
See main.xml# keywords-feature for a list of standard features, derived from OLiA.
Formal Definition
~feature-pattern
~feature-pattern-no-code
Used by: ~feature-list
, ~category
Caution | |
---|---|
Every |
Example 8.204. <feature>
<TAN-mor TAN-version="1 dev" id="tag:kalvesmaki.com,2014:tan-r-mor:eng:penn"> ......... <body> <for-lang>eng</for-lang> <feature code="''"> <IRI>tag:textalign.net,2015:morphology:option:quotation-mark-closing</IRI> <name>closing quotation mark</name> <desc>Examples: ' ''</desc> </feature> <feature code="--"> <IRI>http://dbpedia.org/resource/Dash</IRI> <name>dash</name> <desc>Examples: --</desc> </feature> <feature code="$"> <IRI>http://dbpedia.org/resource/Dollar_sign</IRI> <name>dollar</name> <desc>Examples: $ -$ --$ A$ C$ HK$ M$ NZ$ S$ U.S.$ US$</desc> </feature> <feature code="["> <IRI>tag:textalign.net,2015:morphology:option:bracket-opening</IRI> <name>opening bracket</name> <desc>Examples: ( [ {</desc> </feature> <feature code="]"> ......... </feature> ......... </body> </TAN-mor>
Note | |
---|---|
Taken from eng.kalvesmaki.com,2014.2 |
The element report
names a pattern that, if found to be true in any <m>
in a dependent TAN-LM file, will return the enclosed message upon validation of the dependent file, along with an error or warning. Modeled on Schematron <report>
.
Formal Definition
~test-pattern
Used by: ~TAN-R-mor-body
Caution | |
---|---|
|
The element TAN-mor
specifies that the TAN file contains definitions for the parts of speech for a language, the codes for those parts, and the rules for combining them. Root element.
Formal Definition
~TAN-root
Important | |
---|---|
Every validated TAN file will include the following message at its root. “This version of TAN is under development, and is subject to change. Participants in developing the TAN schemas, functions, and guidelines are welcome. See http://textalign.net for details.” |
Example 8.205. <TAN-mor>
<TAN-mor TAN-version="1 dev" id="tag:kalvesmaki.com,2014:tan-r-mor:eng:penn"> <head> ......... </head> <body> ......... </body> </TAN-mor>
Note | |
---|---|
Taken from eng.kalvesmaki.com,2014.2 |
The attribute code
contains a string that serves as an identifier for <feature>
.
Formal Definition
string (pattern [^\-\+\s]|[^\+\s]+)
Used by: ~feature-pattern
Caution | |
---|---|
Codes for ( |
Example 8.206. @code
<TAN-mor TAN-version="1 dev" id="tag:kalvesmaki.com,2014:tan-r-mor:eng:penn"> ......... <body> <for-lang>eng</for-lang> <feature code="''"> <IRI>tag:textalign.net,2015:morphology:option:quotation-mark-closing</IRI> <name>closing quotation mark</name> <desc>Examples: ' ''</desc> </feature> <feature code="--"> <IRI>http://dbpedia.org/resource/Dash</IRI> <name>dash</name> <desc>Examples: --</desc> </feature> <feature code="$"> <IRI>http://dbpedia.org/resource/Dollar_sign</IRI> <name>dollar</name> <desc>Examples: $ -$ --$ A$ C$ HK$ M$ NZ$ S$ U.S.$ US$</desc> </feature> <feature code="["> <IRI>tag:textalign.net,2015:morphology:option:bracket-opening</IRI> <name>opening bracket</name> <desc>Examples: ( [ {</desc> </feature> <feature code="]"> ......... </feature> ......... </body> </TAN-mor>
Note | |
---|---|
Taken from eng.kalvesmaki.com,2014.2 |
The attribute context
specifies under what conditions a particular <assert>
or <report>
should be enforced. When an <m>
in a dependent TAN-LM file is validated, if it contains the codes for the features in question, the other conditions of the <assert>
or <report>
will be checked; otherwise, the <assert>
or <report>
will be ignored.
Formal Definition
Used by: ~test-pattern
Caution | |
---|---|
|
The attribute feature-qty-test
specifies a range or sequence of integers (e.g., 2-4). If the quantity of features in an <m>
matches a number from that sequence, the condition is true, and false otherwise. If the keyword 'last' or 'max' is used, the number of features will be substituted.
This test is useful for non-category based languages to put a limit on the number of features that can be declared in an <m>
. It is one of four tests for determining the truth value that will determine whether a <report>
or <assert>
will be acted upon.
Formal Definition
string (pattern ((last|max|all|\*)|((last|max)-\d+)|(\d+))(\s*-\s*(((last|max))|((last|max)-\d+)|(\d+)))?(\s*[, ]\s*(((last|max))|((last|max)-\d+)|(\d+))(\s+-\s+(((last|max))|((last|max)-\d+)|(\d+)))?)*|.*\?\?\?.*)
Used by: ~test-pattern
Caution | |
---|---|
Sequences may not include values less than 1. |
Caution | |
---|---|
Sequences may not include values greater than the maximum allowed. |
Caution | |
---|---|
Sequences may not include ranges that go from a larger value to a smaller, e.g., 4 - 2. |
The attribute feature-test
specifies one or more features separated by spaces or the padded + (a plus sign with surrounding spaces). A plain space is treated as meaning "or" and the padded + as meaning "and." If there is at least one match between the list and the value of the codes in an <m>
then the condition will be treated as true. The padded plus sign specifies that all the items need to be found in the <m>
.
For example, feature-test="A B + C D + E" means that the condition will be true for a given <m>
only if that <m>
has A or B and C or D and E present as values. This test is one of four tests for determining the truth value that will trigger the message in a <report>
or <assert>
Formal Definition
string (pattern [^\s\+]+(\s(\+\s)?[^\s\+]+)*)
Used by: ~test-pattern
Caution | |
---|---|
|
The attribute matches-m
takes a regular expression. If an <m>
matches the pattern, then the condition will be true.
One of four tests for determining the truth value that will trigger the message in a <report>
or <assert>
Formal Definition
Used by: ~test-pattern
Caution | |
---|---|
Attributes that take a regular expression must use escape sequences recognized by XML schema or TAN escape extensions (\k{}). See http://www.w3.org/TR/xmlschema-2/#regexs for details. |
The attribute matches-tok
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
Used by: ~test-pattern
Caution | |
---|---|
Attributes that take a regular expression must use escape sequences recognized by XML schema or TAN escape extensions (\k{}). See http://www.w3.org/TR/xmlschema-2/#regexs for details. |