I am trying to create a rule for Russian to spot the expression of “заедание суда”. Here, both words are spelled correctly but the whole expression does not make sense as it means (roughly) “court jam”, and the right one should be “заседание суда” (“court session”).
Since I use LanguageTool with LibreOffice, I downloaded the latest (of 3rd September 2020) snapshot of the LO extension, installed, found LT files in the user profile, found grammar.xml and added a piece of code as follows:
<rulegroup id="ZASEDANIJE_ZAJEDANIJE" name="Логические ошибки: «заседание» или «заедание»"> <rule> <pattern> <token inflected="yes">заедание</token> <token inflected="no">суда</token> </pattern> <message>Имелось в виду <suggestion><match no="1" regexp_match="заедани(.*)" regexp_replace="заседани$1" /> <match no="2" /></suggestion>?</message> <short>Логическая ошибка</short> <example correction="заседание суда"><marker>Заседание суда</marker> перенесено на завтра.</example> </rule> </rulegroup>
(I tried to attach the resulting grammar.xml but could not).
I have created a simple test file (again, tried to attach but could not) with faulty sentences. My rule seems to work, the error is detected in all cases, with the word “заседание” inflected, and a correct expression is suggested as a replacement.
But in a sentence, where the expression is written with the first letter capitalized (i. e. “Заседание суда”), the correction suggestion is wrong, it simply repeats the error.
What am I missing?