Hello,
We have cases where we want to suggest lowercasing words at the beginning of a sentence, typically list items.
This dummy example works as expected:
<rule id="test">
<pattern case_sensitive="yes">
<token>HELLO</token>
</pattern>
<message>Do not capitalize.</message>
<suggestion><match no="1" case_conversion="alllower"/></suggestion>
</rule>
$ echo 'HELLO.' | java -jar languagetool-commandline.jar -l en-GB -eo -e test
1.) Line 1, column 1, Rule ID: test[1] premium: false
Message: [ISG] Do not capitalize.
Suggestion: hello
HELLO.
^^^^^
But when adding a sentence start tag to the rule, LT enforces the initial capital letter in the suggestion despite the “alllower” conversion, although we use the exact same input:
<rule id="test">
<pattern case_sensitive="yes">
<token postag="SENT_START"/>
<token>HELLO</token>
</pattern>
<message>Do not capitalize.</message>
<suggestion><match no="2" case_conversion="alllower"/></suggestion>
</rule>
$ echo 'HELLO.' | java -jar languagetool-commandline.jar -l en-GB -eo -e test
1.) Line 1, column 1, Rule ID: test[1] premium: false
Message: [ISG] Do not capitalize.
Suggestion: Hello
HELLO.
^^^^^
I tried variants with regexp_match/regexp_replace, and also case_conversion=“preserve” as described in Tips and Tricks | dev.languagetool.org, but the same always happens. The doc says “If you want to suppress the default behavior, you need to use the match element”, which is what we do here.
Is it a bug, or did I misunderstand something? If so, how to prevent the capitalization of the suggestion?