TAN-LM global variables, keys, and functions summarized

Definition: tan:group-by-IRIs($features-prepped)

No variables, keys, functions, or named templates depend upon this xsl:variable.

Relies upon tan:group-by-IRIs $features-prepped .

Definition: tan:prep-TAN-mor(tan:resolve-doc(tan:get-1st-doc($head/tan:declarations/tan:morphology), false((), 'morphology', $head/tan:declarations/tan:morphology/@xml:id, (), ()))

Used by variable $features-prepped

Used by template ŧ prep-tan-lm ŧ convert-code-to-features

Used by function tan:expand-m()

Relies upon tan:prep-TAN-mor tan:resolve-doc tan:get-1st-doc $head .

Definition: '%'

Used by function tan:rebuild-ana-fragment() tan:ana-grouping-key()

Does not rely upon global variables, keys, functions, or templates.

Definition: '#'

Used by function tan:rebuild-ana-fragment() tan:ana-grouping-key()

Does not rely upon global variables, keys, functions, or templates.

tan:add-tok-val($tan-lm-resolved as document-node()*, $src-tokenized as document-node()*) as document-node()*

take a fully expanded TAN-LM file ($self4) and to each <tok> add the value of

the token chosen, as @val, and replacing any pre-existing @val with @val-orig

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon ŧ add-tok-val .

tan:all-morph-codes($morph as item()*, $codes as xs:string*) as xs:string*

Change any sequence of morphological codes into a sequence of synonymous morphological codes

Input: node(() picking a TAN-R-mor file, a sequence of strings, each item being the value of

tan:option/@code or tan:feature/@xml:id

Output: sequence of strings returning all equivalent lowercased values of each tan:option/@code or tan:feature/@xml:id

E.g., ('NN','comma','.') - > ('nn','comma',',','.','period')

Used by function tan:feature-test-check()

Does not rely upon global variables, keys, functions, or templates.

tan:ana-grouping-key($tok-lm-l-or-m-element as element()*) as xs:string*

Input: zero or more <tok>, <lm>, <l>, or <m>s

Output: an equal number of strings that concatenate the properties of that element

Especially made to be used in the @group-by value of <xsl:for-each-group /> statements.

See also tan:rebuild-ana-fragment(), which can reconstruct the <ana> fragment.

Used by function tan:ana-grouping-key()

Relies upon $tok-grouping-key-key $l-grouping-key-key $m-grouping-key-key $sep-1 $sep-2 tan:ana-grouping-key .

tan:convert-code-to-features($tan-lm-resolved as document-node()*) as document-node()*

adds to every <m> a <feature @xml:id> for every part of the code

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon ŧ convert-code-to-features .

tan:expand-m($m as element()*, $add-counts as xs:boolean) as element()*

Expands an <m>.

Input: (1) one or more <m>s, (2) true/false indicating whether features should be counted

Output: that <m>, and for every code, the corresponding <feature> is inserted

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon $morphologies-prepped .

tan:expand-per-lm($tan-lm-resolved as document-node()*) as document-node()*

Takes a TAN-LM and consolidates it, creating one <ana> per individual <l> + <m> pair,

then putting in it any <tok> that shares that data

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon ŧ expand-lm .

tan:feature-test-check($code as xs:string, $feature-expr as xs:string, $morph as item()*) as xs:boolean

Checks to see if a logical expression of morphological codes (+ synonyms) is found in a given value of <m>

Input: two strings, the first a morphological code to be checked to see if it matches the second, a logical

expression of features; a third parameter, a node((), defines the morphology rule to be used (to reconcile

synonyms in codes)

Output: true(() if a match is found, false(() otherwise

E.g., 'nn 1 m', '(NN | m), 2' - > false(()

E.g., 'nn 1 m', '(NN | m), 1' - > true(()

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon tan:escape tan:all-morph-codes .

tan:get-lm-ids($ana-elements as element()+) as xs:string*

Input: any number of <ana>

Output: one string per combination of <l> + <m>, calculated by joining (1) the <l> value,

(2)the <m> code, and (3) attribute values of <lm>, <l>, and <m>

Used by template ŧ expand-lm

Relies upon $empty-doc .

tan:get-matching-lm-combos($l-element as element(), $m-element as element()) as element()*

Input: one <l> and one <m>

Output: all matching combinations. If an <lm> has only one <l> and <m> (and both match)

then the entire <lm> is picked. If there's only one <l> and many <m>s then only the <m> is picked;

and vice versa. If there are many <m>s and <l>s then nothing is picked, since any alterations

to any <l> or <m> in that case would affect other <l> + <m> combos that have not been picked.

This function is useful for global deletions of a particular lexeme +

morphological code pair.

No variables, keys, functions, or named templates depend upon this xsl:function.

Does not rely upon global variables, keys, functions, or templates.

tan:get-matching-ls-or-ms($l-or-m-element as element()) as element()*

Input: one <l> or one <m>

Output: all matching combinations. If an <lm> has only one <l>/<m>

then the entire <lm> is picked. Otherwise, it picks only the <l>/<m>

that matches.

This function is useful for global deletions of a particular lexeme or

morphological code

No variables, keys, functions, or named templates depend upon this xsl:function.

Does not rely upon global variables, keys, functions, or templates.

tan:obeyed-by-m($assert-or-report-prepped as element(), $m-element-prepped as element()?) as xs:boolean?

Input: any TAN-LM <m> that has been prepped (i.e., has @orig-code and has children <f>);

any TAN-mor <report> or <assert>

Output: a boolean value indicating whether all the conditions made by the assert (or report) are true (false).

Function assumes that all features have been space-normalized and rendered lowercase.

This function is used primarily to pick out <assert>s and <report>s that an <m> violates

Used by template ŧ prep-tan-lm

Relies upon tan:feature-test-to-groups .

tan:rebuild-ana-fragment($tok-l-or-m-grouping-key as xs:string*) as element()*

Takes any set of strings that are the result of tan:[tok/l/m]-grouping-key(()

and for each one returns a rebuilt fragment of the original <ana> upon which

it is based. Useful for reconstructing fragments of documents after <xsl:for-each-group/>

operations.

No variables, keys, functions, or named templates depend upon this xsl:function.

Relies upon $sep-2 $sep-1 .