Hello,
I was trying to write a rule that uses inflected=“yes” and case_sensitive=“yes” at the same time, but it seems the case sensitivity is ignored in this case. There are a few rules in the default en/grammar.xml that use both; for instance this simple one at least does not work as expected:
<rule id="SAFE_GUARD_COMPOUND" name="safe guard (safeguard)">
<pattern>
<token case_sensitive="yes" regexp="yes">[Ss]afe</token>
<token case_sensitive="yes" inflected="yes">guard</token>
</pattern>
<message>This word is normally spelled as one.</message>
<suggestion>\1\2</suggestion>
<example correction="safeguard">She kept a savings to <marker>safe guard</marker> against debt and emergencies.</example>
</rule>
Execution:
$ echo "Safe Guards" | java -jar languagetool-commandline.jar -l en-GB
Expected text language: English (GB)
Working on STDIN...
1.) Line 1, column 1, Rule ID: SAFE_GUARD_COMPOUND[1] premium: false prio=1
Message: This word is normally spelled as one.
Suggestion: SafeGuards
Safe Guards
^^^^^^^^^^^
Is it a bug in LT, or should we consider that inflected=“yes” also produces (lower|upper)case variants?