Check a Short English Text with a Local LanguageTool Server
Start LanguageTool's embedded HTTP server from the downloaded snapshot as the documentation describes, send one synthetic English sentence with curl, read the reply, then stop it.
Before you start · 1. Enter the unzipped directory · 2. Prepare server.properties
At a glance
This tutorial runs LanguageTool's embedded HTTP server from the unzipped snapshot on your own computer instead of the cloud, sends it a short English text, and reads the result. The documentation warns that this route is meant for advanced users comfortable with the command line; otherwise it recommends the default settings, which use its cloud servers. The local server is a basic build without the AI-based rules that exist only in the cloud, so its results can differ from the cloud's.
Workflow
Is the server running?
After startup the terminal should stay busy with no error. If java is not found, fix Java first.
Did the request arrive?
Submit the text by POST and expect a reply from localhost, not a refused connection.
Is the scope clear?
The local server has no AI rules and no synonyms, so results reflect only the local rule set.
Before you start
- A computer with a terminal and Java 8 or later installed; the documentation says to install Java first if startup reports that java cannot be found.
- LanguageTool-latest-snapshot.zip downloaded and unzipped as described. Every step below relies on this unzipped directory and the languagetool-server.jar inside it.
- A synthetic English sample with no real names, company or account details, for example: This are a simple test.
- Port 8081 free on your machine. The number comes from the documentation's example; you may pick another, but then change the addresses below to match.
- A working curl command; install or prepare curl before the request steps if it is missing.
1. Enter the unzipped directory
In a terminal, change into the unzipped LanguageTool directory and confirm that languagetool-server.jar is inside. Run every later command from this directory.
2. Prepare server.properties
If you skip the optional fastText steps, create an empty server.properties file in that directory. If you did build fastText and download its language identification model, put the fasttextModel and fasttextBinary lines in the file, with paths changed to your own installation.
3. Start the HTTP server
In the same directory run the documented command: java -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --port 8081 --allow-origin. The documentation says you can remove --allow-origin if you will not use the server from the browser add-on. Leave this terminal window open.
4. POST the synthetic sentence
Open a second terminal window and run: curl -d "language=en-US" -d "text=This are a simple test." http://localhost:8081/v2/check. The documentation says real use should go through POST; for a quick probe you can instead open http://localhost:8081/v2/check?language=en-US&text=my+text in a browser.
5. Read the reply
The reply is JSON; for the meaning of its fields, consult the JSON API page the documentation points to. Compare each suggestion with the original sentence and decide whether it is a real grammar or spelling issue and whether it keeps your intended meaning. Do not replace the whole sentence blindly. Save a change list recording each original passage, returned suggestion, accept-or-retain decision and final edit. Record the actual result even when the service returns no suggestions.
6. Stop the server
Go back to the terminal window where the server runs and end that foreground process. The documentation does not spell this out; it is ordinary terminal practice. Then run the curl command again. It should fail to connect, which shows the address no longer responds. To be sure the process has fully exited, also look at your system's process list.
Original example
Synthetic input: This are a simple test.
1. Create an empty server.properties in the unzipped directory.
2. Run: java -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --port 8081 --allow-origin
3. In another terminal run: curl -d "language=en-US" -d "text=This are a simple test." http://localhost:8081/v2/check
4. What to do with the reply: look for a subject-verb agreement hint on This are. If none appears, do not conclude the sentence is correct; it only means the local rule set did not flag it.
5. When finished, end the server process in its terminal and run curl once more to confirm the address no longer responds.
Save a change list recording each original passage, returned suggestion, accept-or-retain decision and final edit. Record the actual result even when the service returns no suggestions.
Completion checks
- The terminal running the server shows no java-not-found error and the process stays alive.
- The curl command uses POST (-d), ends in http://localhost:8081/v2/check, and its port matches the startup command.
- The reply came from your own machine, and you compared each suggestion with the original sentence instead of accepting it wholesale.
- After stopping, a new request fails, which shows the address is unavailable. That does not by itself prove the process has exited, so check separately if it matters.
- Save a change list recording each original passage, returned suggestion, accept-or-retain decision and final edit. Record the actual result even when the service returns no suggestions.
Limits
- The local server lacks the AI-based rules available only in the cloud, and the Windows desktop app does not work with this approach.
- The documentation states the server does not support synonyms, so the add-on's synonym feature will not work.
- For security the server is not reachable from other hosts by default. Serving remote users requires the --public option plus your own risk review; the documentation recommends an Apache or nginx reverse proxy with SSL/TLS.
- Without fastText, language detection is weaker, especially on Windows; this tutorial sets language=en-US so it does not rely on detection.
- The documentation also mentions installing on macOS with brew (support not provided by the LanguageTool team). That is a different route and is not covered here.
Verification scope
This tutorial is based on reading the official documentation only. I did not test login, installation, execution of the product API, file upload, or any generated output. The sentence and parameters are illustrative samples adapted from the documentation, and your actual reply depends on what your own machine returns.
Article sources
Original editorial content; official descriptions and checking suggestions are distinguished.