Back to LanguageTool Homepage - Privacy - Imprint

Creating own rules, especially regex


(Piotr) #1

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


(Daniel Naber) #2

Hi Piotr,

editing/adding rules is documented at http://wiki.languagetool.org/development-overview. Basically, you just edit the grammar.xml file of your language. Let us know if you have any questions.

Regards
Daniel


(Piotr) #3

Hi Daniel,

Thanks for your prompt reply.

Piotr


(Piotr) #4

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


(Daniel Naber) #5

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 http://community.languagetool.org/ruleEditor/expert