‘Immunizing words from matching’ (Developing a Disambiguator | dev.languagetool.org) implies that immunization makes a word or a phrase ‘invisible’. As if it does not exist. It is not possible for a rule to match the immunized text.
In standalone LT, I added this disambiguation rule at the end of disambiguation:
<rule id="IMMUNIZE" name="Immunize text">
<pattern>
<marker>
<token>*</token>
<token spacebefore="no" regexp="yes">[a-z]+</token>
<token>*</token>
</marker>
</pattern>
<disambig action="immunize"/>
</rule>
Testrules gives no warnings.
The screen shot shows that grammar rule IN_A_TROUBLE finds only the sentence that does not contain the immunized text. Shouldn’t it also find the error in the second sentence? Why are the disambiguations different
I asked a similar question some years ago, but I did not get an answer (Immunization for disambiguation: empty line affects the disambiguation). Thus, I ask again.