Back to LanguageTool Homepage - Privacy - Imprint

LT Standalone /w Separate Rule File

Hello. I am trying to use the standalone languagetool.jar executable for local rule development (as per the advice for developing robust rules). I have set up a simple rule file for testing the configuration:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./print.xsl" title="Pretty print" ?>
<?xml-stylesheet type="text/css" href="./rules.css" title="Easy editing stylesheet" ?>
<rules lang="en" ns:noNamespaceSchemaLocation="./rules.xsd" xmlns:xs=""
       xmlns:xlink="" xmlns:xila=""
       xmlns:xi="" xmlns:trans=""
       xmlns:svg="" xmlns:ns=""
       xmlns:m="" xmlns:html=""
    <category id="DEVELOPMENT" name="Development Rules">
        <rule id="FOO_BAR" name="Use of &quot;foo bar&quot;">
            <message>Use of "foo" in text is not allowed!</message>
            <example correction="" type="incorrect"><marker>Foo</marker> or bar?</example>

I have named this file “rules-en-English.xml”, and it seems to load fine. However, when I run a check against a sentence like “This is foo bar”, LT doesn’t raise any alarms, so I am wondering if I am doing something wrong in loading the file into the application.

I am running LanguageTool 5.1 (though I have also tried this on a 5.2 snapshot from last week). Any help would be greatly appreciated!

I’m not sure why it doesn’t work, but my advice would be to use the rule editor and then copy the result to the <lang>/grammar.xml file.