Search for synonym terms.
The following construct(s) refer to this construct:
tf:synonym(string $termName, string? $thesaurus) => unspecified
The function tf:synonym
is specific to Tamino. It takes a
string as argument which is the name of a thesaurus entry. The function returns
all synonymous terms of $termName
. If there are no
synonyms defined, only $termName
is returned.
This function can only be used within the scope of the following functions:
tf:containsAdjacentText
tf:containsNearText
tf:containsText
tf:createAdjacentTextReference
tf:createNearTextReference
tf:createTextReference
$termName |
name of a thesaurus entry that is defined in the
|
---|---|
$thesaurus |
name of a thesaurus |
Return synonymous terms of "dog" in the specified document:
let $doc := <doc> <p>Have you seen the large dog around the corner?</p> <p>On the farm nearby, a checkered whelp was playing on the ground with some cats.</p> <p>Also, some horses could be seen in the stable.</p> </doc> for $p in $doc/p where tf:containsText($p, tf:synonym("dog")) return $p