I’m trying to run a local server with the thunderbird addon : Grammar and Spell Checker — LanguageTool :: Add-ons for Thunderbird
I’ve installed that, downloaded LanguageTool-stable and run it using:
java -cp languagetool-server.jar org.languagetool.server.HTTPServer --allow-origin ‘*’ --public
The addon returns:
Oops…Cannot connect to http://localhost:8081/v2/check - please check your internet connection or try again in a minute (#1, code=undefined)
The server outputs:
2021-10-09 16:42:00.483 +0800 INFO org.languagetool.server.DatabaseAccessOpenSource Not setting up database access, dbDriver is not configured
2021-10-09 08:42:00 +0000 WARNING: running in HTTP mode, consider running LanguageTool behind a reverse proxy that takes care of encryption (HTTPS)
2021-10-09 08:42:01 +0000 Setting up thread pool with 10 threads
2021-10-09 08:42:01 +0000 Starting LanguageTool 5.5 (build date: 2021-10-02 12:33:00 +0000, 5e782cc) server on http://localhost:8081…
2021-10-09 08:42:01 +0000 Server started
2021-10-09 16:42:39.259 +0800 WARN org.languagetool.language.LanguageIdentifier Cannot consider noopLanguages because not in fastText mode: [en, zh]
2021-10-09 16:42:39.260 +0800 WARN org.languagetool.language.LanguageIdentifier Cannot consider noopLanguages because not in fastText mode: [en, zh]
2021-10-09 16:42:47.807 +0800 INFO org.languagetool.server.TextChecker Check done: 308 chars, en-US (mother tongue: en)[auto], requestId: null, #1, null, 0/1 matches, 8602ms, agent:webextension-unknown-ng, version: 4.1.1, sent, q:0, h:2, dH:1, r:2, m:tlo, premium: false
2021-10-09 16:42:50.062 +0800 INFO org.languagetool.server.TextChecker Check done: 312 chars, en-US (mother tongue: en)[auto], requestId: null, #1, null, 0/1 matches, 10871ms, agent:webextension-unknown-ng, version: 4.1.1, sent, q:0, h:1, dH:1, r:2, m:!tlo, premium: false
curl works:
curl ‘http://localhost:8081/v2/check?language=en-US&text=my+text’
{“software”:{“name”:“LanguageTool”,“version”:“5.5”,“buildDate”:“2021-10-02 12:33:00 +0000”,“apiVersion”:1,“premium”:false,“premiumHint”:“You might be missing errors only the Premium version can find. Contact us at supportlanguagetoolplus.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}]}
So does accessing from a browser
LibreOffie Writer works when using “remote server”: http://localhost:8081
2021-10-09 16:46:07.958 +0800 INFO org.languagetool.server.TextChecker Check done: 27 chars, en-US, requestId: null, #1, null, 0/1 matches, 4311ms, agent:java-http-client, sent, q:0, h:1, dH:1, r:2, m:!tlo, premium: false
Thunderbird works when using: https://api.languagetool.org/v2/
Yay, no errors found!You can be proud of yourself
Obviously both the server and plugin work. But somehow not with each other in my case. Any idea what’s wrong?