onTagger function is where to put tagging code and is executed after the evaluation of the tagging rules.
Tagging by script is done using specific methods of the predefined
DIS object. This object has tagging and untagging methods, but also methods that give access to the results of the disambiguation, so it "knows" about the subdivisions of the text at different levels: paragraphs, sentences, phrases, tokens.
The tagging/untagging methods allow you to add or remove tags to all the tokens of a given subdivision: adding a tag to a sentence, for example, adds the same tag to all the tokens of the sentence, removing a tag from a sentence removes the tag from all the tokens of the sentence.
The effects of the different methods are illustrated below as can be seen in Studio's Semantic Analysis tool window.