Creating own rules, especially regex

In my local installation of LT, can I add my own rules, and if yes, how?

And is there a HOWTO for creating regex rules? I am familiar with regular expressions, but not combined with LT.

Thanks,

Piotr

Hi Piotr,

editing/adding rules is documented at Development Overview - LanguageTool Wiki. Basically, you just edit the grammar.xml file of your language. Let us know if you have any questions.

Regards
Daniel

Hi Daniel,

Thanks for your prompt reply.

Piotr

Does the XML need to be edited when languagetool is not running, or does it accept “live” changes to the XML file?

You can edit it while LT is running, but you’ll have to restart LT after making any changes. In general, it makes sense to not test interactively but by using testrules.sh or testrules.bat, as described in the Wiki page linked above. Or even directly use the online editor at Check a LanguageTool XML rule