1

I have installed

sudo apt-get install default-jre
sudo apt-get install icedtea-plugin

following install Java on Ubuntu. I tried this answer after that tried to follow the steps language tool HTTPS server The only difference wrt to the above answer is that I have kept the language tool in my home folder rather than in opt. Trying to run the Language tool server results in

Trying to run the Language tool server and this is the

Running

curl --data "language=en-US&text=a simple test" http://localhost:8081/v2/check

results in

{"software":{"name":"LanguageTool","version":"5.4",
"buildDate":"2021-06-25 10:24:16 +0000","apiVersion":1,
"premium":false,
"premiumHint": "You might be missing errors only the Premium version can find. 
Contact us at support<at>languagetoolplus.com.",
"status":""},"warnings":{"incompleteResults":false},
"language":{"name":"English (US)","code":"en-US",
"detectedLanguage":{"name":"French","code":"fr","confidence":0.815771}},
"matches":[{"message":"This sentence does not start with an uppercase letter.","shortMessage":"",
"replacements":[{"value":"A"}],
"offset":0,"length":1,
"context":{"text":"a simple test","offset":0,"length":1},"sentence":"a simple test",
"type":{"typeName":"Other"},
"rule":{"id":"UPPERCASE_SENTENCE_START",
"description":"Checks that a sentence starts with an uppercase letter",
"issueType":"typographical","category":{"id":"CASING","name":"Capitalization"}},
"ignoreForIncompleteSentence":true,"contextForSureMatch"

Similarly going to http://localhost:8082/v2/check?language=en-US&text=my+text

leads to

{"software":{"name":"LanguageTool","version":"5.4",
"buildDate":"2021-06-25 10:24:16 +0000",
"apiVersion":1,"premium":false,
"premiumHint": "You might be missing errors only the Premium version can find. Contact us at support<at>languagetoolplus.com.",
"status":""},"warnings":{"incompleteResults":false},
"language":{"name":"English (US)",
"code":"en-US",
"detectedLanguage":{"name":"English (US)","code":"en-US",
"confidence":0.65618557}},
"matches":[{"message": "This sentence does not start with an uppercase letter.",
"shortMessage":"",
"replacements":[{"value":"My"}],
"offset":0,"length":2,
"context":{"text":"my text","offset":0,"length":2},
"sentence":"my text","type":{"typeName":"Other"},
"rule":{"id":"UPPERCASE_SENTENCE_START",
"description":"Checks that a sentence starts with an uppercase letter",
"issueType":"typographical",
"category":{"id":"CASING","name":"Capitalization"}},
"ignoreForIncompleteSentence":true,"contextForSureMatch":-1}]}

Strangely the standalone version of the Language tool works On typing java -jar languagetool.jar in the terminal, we have standalone language tool

My TeX studio settings Texstudio setting

And the output of Texstudio> Help> check Language tool is

which java: /usr/bin/java

JAVA: java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode)

Real-time checking is enabled. Grammar checking is enabled.

Tries to start automatically.

LT current status: working

LT-URL: http://localhost:8081/v2/check

1 Answers1

0

The best thing to do is to reinstall Language studio.

The output of curl --data "language=en-US&text=a simple test" http://localhost:8081/v2/check clearly shows that your browser cannot render the output of language tool.

Sebastiano
  • 54,118