Back to LanguageTool Homepage - Privacy - Imprint

Calling function from xml

I am looking for a solution for the Dutch concatenation problem. When a rule needs to suggest 2 words to be glued together, there are rules that interfere.
First, when either side (not both) on the gluing position is a capital, a hyphen should be added.
When the combination would lead to certain vowel combinations (o-e , a-e , o-i e-i e.g.) a hyphen is needed as well.
And when either (or both) parts is spelled, then also (tv-kast).

As a combination is suggested quite a lot (English disease!), I am looking to centralize this in a function like concat(word1,word2). But there are no functions possible in XML.
Or is there a trick to do this?

Yes, a filter can be written for this, like we already use for the date check: <filter class="org.languagetool.rules.nl.DateCheckFilter" args="year:\4 month:\3 day:\2 weekDay:\1"/>. A new class would be added which you could refer to instead of org.languagetool.rules.nl.DateCheckFilter. If you could write the logic you described above in pseudo-code, that would help to make things more clear.

That would be great. I will send you the pseudocode.