Back to LanguageTool Homepage - Privacy - Imprint

Prohibit.txt - case-sensitive?

Is prohibit.txt case-sensitive? Can I add “Problemlos” to disallow the capitalization of this word without affecting “problemlos”?

I don’t know. But I think this case would better be solved by a grammar rule:

<rule id="PROBLEMLOS_KLEIN" name="Problemlos (problemlos)">
    <pattern case_sensitive="yes">
        <token negate_pos="yes" postag="SENT_START"/>
            <token regexp="yes">Problemlos(e[nmrs]?)?</token>
    <message>Meinten Sie <suggestion><match no="2" case_conversion="alllower"/></suggestion>?</message>
    <example correction="problemlos">Es lief völlig <marker>Problemlos</marker>.</example>
    <example correction="problemlose">Es war eine <marker>Problemlose</marker> Sache.</example>

The problem is that “das Problemlos” is in theory a correct noun and LT treats the word as such. As the noun is never(?) used I thought it’d be better to exclude it from the list of correct words instead of writing a whole rule for it. But maybe your way is the better one.

In chapter/story titles it’s common practice to start every word with a capital. While “Problemlos” (problemless/problem-free) doesn’t give something enticing, it could be used
A. sarcastically.
B. in reference to a base-line (“compared to most days, today was problem-free” … not that reassuring about how things are normally)
C. as something that the protagonist doesn’t know how to deal with. (protagonist becomes paranoid as the chapter calmly progresses and, perhaps, snaps in the next one.)

Ah, I see. In that case, forget my above suggestion. Unwanted readings of a word can be added to the file languagetool/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/removed.txt. I think you added “das Bleistift” there recently.

prohibit.txt only works with the spell checker. Spell checking and grammar checking are done by different modules. In many cases (such as German) they even have completely unrelated dictionaries.

I wonder if we really want to remove the noun reading in this particular case, though. I think there are valid uses, such as “Ich Pechvogel habe natürlich wieder das Problemlos gezogen. Der Gewinn ist ein lebender Leopard, den ich persönlich in Reykjavík abholen muss.”

Is there something you want to accomplish where the noun reading gets in the way?

Not in German.

My mistake was that I thought that case was handled by the spell checker, but as I see this is not the case (no pun intended). Then it is correct that I should use removed.txt.

Well, I’m not sure it is really helpful to think about such theoretical examples. Yes, maybe some time someone will find a reason to use the word “Problemlos” and maybe some time someone will found a monastery near a lead mine and call it “das Bleistift”. But the capitalized “Problemlos” is a mistake that I actually encountered in a Facebook discussion and I think that this mistake should be corrected by LanguageTool. It may be not a very common mistake but definitely much more common than writings about problematic lots.

But if I am alone with this opinion I will tackle another problem instead (my task list is quite long :slight_smile: )

I agree, your solution is probably the most practical way to tackle the problem. Using a grammar rule as I suggested above would pretty much achieve the same thing, though.
I don’t think there is such a thing as “the best solution” in this case. We only have about ten years of experience, and that isn’t as much as it sounds.
As always: be bold and try not to break things. Be as careful as you can, but don’t worry too much.

I now have the same problem as with Bleistift. Removed.txt doesn’t work because the word is a compound. I think you are right after all, a grammar rule is the easiest solution.

I’ve just committed the rule with an added antipattern for “das Problemlos ziehen”.

1 Like

Which version did you use for testing this? On, I get the expected result for “Das Bleistift ist schön.”

Yes, because I additionally added “der Bleistift” to added.txt. See the according forum thread for that. But this doesn’t work for the problem described here.