Back to LanguageTool Homepage - Privacy - Imprint

How to find the tab character?

I would like to make rules that find the tab character in some contexts. Is it possible, and if yes, how?

This rule partly works:

<rule id="TAB_CHARACTER" name="Find a tab character">
    <message>Found a tab</message>
    <example correction="">A tab character: a<marker>&#x9;</marker>b between a and b.</example>
    <example>No tab character.</example>


But, testrules gives this warning:

Running pattern rule tests for English... Exception in thread "main" java.lang.AssertionError: English rule TAB_CHARACTE
"A tab character: ab between a and b."
Errors expected: 1
Errors found   : 0
Message: Found a tab
Analyzed token readings: [/SENT_START*] A[a/DT*,B-NP-singular]  [ /null*] tab[tab/NN,I-NP-singular]  [ /null*] character
[character/NN:UN,E-NP-singular] :[:/:*,O]  [ /null*] ab[ab/null,B-NP-singular|E-NP-singular]  [ /null*] between[between/
IN,B-PP]  [ /null*] a[a/NNP,B-NP-singular]  [ /null*] and[and/CC,I-NP-singular]  [ /null*] b[b/null,E-NP-singular] .[./.
Matches: []

Also, the right-click menu does not work fully.

W3C Schools ( shows 3 ways to represent the tab character in HTML. If I use &Tab;, testrules gives this warning:

Exception in thread "main" Cannot load or parse '/org/languagetool/rules/en/grammar.xml'
        at org.languagetool.XMLValidator.validateWithXmlSchema(
        at org.languagetool.rules.patterns.PatternRuleTest.validatePatternFile(
        at org.languagetool.rules.patterns.PatternRuleTest.runTestForLanguage(
        at org.languagetool.rules.patterns.PatternRuleTest.runGrammarRulesFromXmlTestIgnoringLanguages(PatternRuleTest.j
        at org.languagetool.rules.patterns.PatternRuleTest.main(
Caused by: org.xml.sax.SAXParseException; lineNumber: 118; columnNumber: 26; The entity "Tab" was referenced, but not de
        at Source)

Just press the Tab key on the keyboard and you’ll be fine.