Back to LanguageTool Homepage - Privacy - Imprint

[en] Immunization rules CD_OR_MORE and others

In disambiguation, someone has immunized various phrases, for example, refer to rule CD_OR_MORE and the surrounding rules.

As a result, this grammar rule does not work:

<rule name="CD or more" id="TEST_CD_OR_MORE">
    <token postag="CD"/>
  <message>Found: \1 \2 \3</message>
 <example correction="">If you find <marker>two or more</marker> problems, stop the test.</example>

Testrules gives this message:

Exception in thread "main" java.lang.AssertionError: English rule TEST_CD_OR_MORE[1]:
"If you find two or more problems, stop the test."
Errors expected: 1
Errors found   : 0

What is the reason for the immunization?

That disambiguation rule was added 5 years ago by Marcin. You could just change it to ignore_spelling - if all tests still work and the nightly tests are okay, we can assume the change was okay.

@dnaber, thanks.

5 years ago, we didn’t have antipatterns for disambiguation, so I guess that immunization was the only way to prevent FP.

I added antipatterns to the grammar rules and put the disambiguation rules into comments ( If all goes well with the regression tests tonight, I will remove the commented code.

I found more disambiguation rules that immunize text, so I will see if I can add antipatterns in grammar as an alternative.

(My deleted comment about ignore_spelling was nonsense: the words are all common English words and there are no spelling errors.)