Command-Line Options
LanguageTool can be started from the command line. You need to specify a filename of the text file to be checked or tagged, or you can use standard input by omitting the filename).
| Option/Parameter | Explanation |
|---|---|
| –-help, -–?, -h, -help | Display short usage message. |
| - | New in 0.9.8. Use standard input instead of a file. |
| –-api | Display LanguageTool output in the special XML API format. |
| -a, -–apply | New in 0.9.8. Use the rules to correct the text directly rather than display suggestions. Note: rules that don't offer corrections are silently ignored. You might use this option to automatically edit the files. Caveat: you might want to select only some very reliable rules to avoid possible false positives. |
| -b | Make single line break a paragraph break. By default, a paragraph break is introduced only after two line breaks. If your input is a list of unrelated lines that contain full sentences, you might want to use this parameter. |
| -c, –-encoding | Text encoding. All Java-recognized encodings are accepted. |
| -d, –-disable | Disable specified rules when checking. Rules are delimited with a comma (,). Note: you cannot specify both enabled and disabled rules at the same time. |
| -e, –-enable | Enable only specified rules, delimited with a comma (,). Note: you cannot specify both enabled and disabled rules at the same time. |
| -l, –-language | Text language. |
| -m, –-mothertongue | User's mother tongue. Used for scanning for false friends. |
| -r, –-recursive | Run LanguageTool recursively on a set of files. |
| -t, –-taggeronly | Use LanguageTool to tag the text. No check is executed. |
| -u, –-list-unknown | List words unknown to LanguageTool tagger. Useful for checking the coverage of the tagger. Note: you cannot specify –-taggeronly and –-list-unknown at the same time. In the tagging mode, untagged words are visible anyway as untagged words, so the parameter makes no sense. |
| -v, –-verbose | Verbose mode: display POS tags assigned by LanguageTool. The POS tags are output to stderr (you can pipe them to a file using 2> file). |
Examples
- Run LanguageTool on a Polish text:
java -jar LanguageTool.jar -l pl polishfile.txt
- Tag UTF-8 encoded Polish text:
java -jar LanguageTool.jar -l pl -c UTF-8 -t polishfile.txt
- Use verbose mode to see the tags to test rules interactively:
java -jar LanguageTool.jar -l en -v -b -
This mode of operation can be useful to see the tags immediately after inputting the text on the keyboard and see why a given rule doesn't work as expected.
page_revision: 1, last_edited: 1240316169|%e %b %Y, %H:%M %Z (%O ago)





