Back to LanguageTool Homepage - Privacy - Imprint

[de] How do I add an exception for UPPERCASE_SENTENCE_START?


(Martin von Wittich) #1

We have a technical term iservchk in our product that is never capitalized (it's a console command on Linux, so if you'd change it to upper case, it would no longer work). I want to allow sentences that begin with this string, but of course LanguageTool complains when a sentence starts with a lowercase letter:

www0.iserv.eu ~ # echo "iservchk ausführen" | lt -v
Expected text language: German (Germany)
Working on STDIN...
2142 rules activated for language German (Germany)
<S> iservchk[iservchk/null,O] ausführen[ausführen/VER:1:PLU:KJ1:SFT:NEB,ausführen/VER:1:PLU:PRÄ:SFT:NEB,ausführen/VER:3:PLU:KJ1:SFT:NEB,ausführen/VER:3:PLU:PRÄ:SFT:NEB,ausführen/VER:INF:SFT,ausfahren/VER:1:PLU:KJ2:NON:NEB,ausfahren/VER:3:PLU:KJ2:NON:NEB,</S>,O]<P/> 
Disambiguator log: 

1.) Line 1, column 1, Rule ID: UPPERCASE_SENTENCE_START
Message: Dieser Satz fängt nicht mit einem großgeschriebenen Wort an
Suggestion: Iservchk
iservchk ausführen 
^^^^^^^^           
Time: 360ms for 1 sentences (2.8 sentences/sec)

I've tried to add iservchk to case_rule_exceptions.txt and when that didn't have any effect, I also tried to add a new rule to disambiguation.xml, both with action=ignore_spelling and action=immunize, but that didn't have any effect either. Do I assume correctly that ./languagetool/languagetool-core/src/main/java/org/languagetool/rules/UppercaseSentenceStartRule.java is ignoring the immunization? Any hint what I could change in my configuration to fix this?


(Daniel Naber) #2

Yes, that's more or less a bug. I've fixed it, the fix will be in the next daily snapshot and in the next release (end of this year).


(Martin von Wittich) #3

Thanks!