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="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:trans="http://docbook.org/ns/transclusion"
xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
<category id="DEVELOPMENT" name="Development Rules">
<rule id="FOO_BAR" name="Use of "foo bar"">
<pattern>
<marker>
<token>foo</token>
</marker>
</pattern>
<message>Use of "foo" in text is not allowed!</message>
<example correction="" type="incorrect"><marker>Foo</marker> or bar?</example>
</rule>
</category>
</rules>
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!