Back to LanguageTool Homepage - Privacy - Imprint

Amend on CLI usage


The file supplied with LanguageTool says:

Command-line version

To check plain text files from the command line, use

java -jar languagetool-commandline.jar -l xx <filename>

with xx being the code for your language, e.g. en-US for American
English or just en for English without spell checking activated.

And that’s all on the command line usage.

I use the above command to check a plain-text file containing a mere word list. The file size is about 1.8 Mib. LanguageTool fails throwing a java.lang.OutOfMemory error.

Suggestion: amend with something like the following:

If you receive a java.lang.OutOfMemory error, try increasing the Java
heap size as follows:

java -XmxYYYYM -jar languagetool-commandline.jar -l xx <filename>

where YYYY is the size in megabytes. Example:

java -Xmx2048M -jar languagetool-commandline.jar -l xx <filename>

Thanks, I will add this.