Open ghost opened 1 year ago
Would <suggestion>\2-<match no="3" case_conversion="alllower"/></suggestion>
solve this?
Not in all cases. Maybecwhen the rule is split into several ones, depending on case. Actually, Iadjusted the rule to only offer the variant with hyphen. That one is alwys correct, in some cases suboptimal, but acceptable. Will have to see how it performs.
After trying to adjust a rule, a bug showed: [ERROR] Errors: [ERROR] DutchPatternRuleTest>PatternRuleTest.lambda$testGrammarRulesFromXML$2:519->PatternRuleTest.testBadSentences:640->PatternRuleTest.assertSuggestions:748->PatternRuleTest.addError:484 » PatternRuleTestFailure Test failure for rule SAMENSTELLING_EIGENNAAM[1] in file /org/languagetool/rules/nl/grammar.xml: Incorrect suggestions: Expected 'K3-jurk|jurk van K3', got: 'K3-jurk|Jurk van K3' on input: 'Het is een K3 jurk.' [INFO] [ERROR] Tests run: 28, Failures: 0, Errors: 1, Skipped: 1
The relevant part of the rule is:
Somehow the lowercase 'jurk' is auto capitalized in the suggestion, because word 1 has a capital. This is wrong, and makes the rule fail.