LanguageTool Community

LanguageTool 6.6-SNAPSHOT (2025-01-03 22:33:09 +0100)

Parse existing XML · Expert Mode

Parse Rule XML
X
Note: this feature is still a bit incomplete

LanguageTool Rule Editor


Watch intro video

LanguageTool finds errors based on rules. Each rule has a pattern that describes an error. A simple pattern can just be a sequence of words, e.g. "bed" followed by "English", which is an error as it should probably be "bad English" instead. The text that is checked by LanguageTool is searched for this pattern, and if it is found, the text at that place is considered to have an error.

This page will help you to create new rules. As a result, you will have your rule in XML format, which you can send to the developers for inclusion in LanguageTool. Need help? Ask in our forum.

Hide the help texts, I know what I'm doing Show help texts

Set Example Sentences

Remove · Show analysis · Update analysis · Hide analysis
warning sign Your example sentences are identical
Use this analysis to see what part-of-speech tags get assigned to the words of your sentence.
You might want to use these part-of-speech tags in your error pattern in the next step.
Remove · Show analysis · Update analysis · Hide analysis
warning sign Your example sentences are identical
Use this analysis to see what part-of-speech tags get assigned to the words of your sentence.
You might want to use these part-of-speech tags in your error pattern in the next step.
wait symbol

Set the Error Pattern

Use this to specify the error pattern, i.e. the sequence of words that - if found in a text that is checked by LanguageTool - triggers an error message. Add a token to the pattern to add a word so your pattern gets longer and thus more specific.

Note: LanguageTool can already detect the following error(s) in your first wrong example sentence:
  Add token to pattern · Add error marker to pattern

Set the Rule Details


warning sign You have a \x reference that's larger than the number of tokens
Use \1, \2 to refer to the first, second token etc. of the matched text.
Use 'single quotes' to mark words that will be shown as suggestions to the user.
 optional
 optional
warning sign This does not seem to be a valid HTTP or HTTPS URL
wait symbol

Check Evaluation Results

Copy the Resulting XML

Thanks for using the online rule editor. Here's your rule in the format that the developers will use to integrate your rule. If you think your rule might be useful to other users of LanguageTool, and if all the checks under 'Evaluation Results' are okay, please send this rule to the LanguageTool developers.

If you just want to use it locally, add it to the grammar.xml file of your LanguageTool installation and restart LanguageTool.

<!-- English rule, 2025-01-04 -->
<rule id="" name="">
 <pattern>
 </pattern>
 <message></message>
 <example correction=''></example>
 <example></example>
</rule>

Part-of-Speech Help