Hi,
I just installed the new version (22.05.3 from repo, I use COOL from Nextcloud) and as I see that it is possible to integrate with LanguageTool (advertised at launch, on Nextcloud side), I choose to give it a try. So far, I’ve got so little results that I even doubt it is implemented.
I installed the LanguageTool java server running with the command :
java -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 8082 --al
low-origin '*' --public
I try to send notification from multiple configurations :
- Directly (HTTPlocalhost:8082)
- Directly from the internet (HTTPmydomain:8082)
- Through an Nginx SSL proxy on the same subdomain as coolwsd (HTTPSsub.mydomain/lt/)
On all of theses scenarios, I can check with curl that it work :
$ curl -d "language=fr" -d "text=j'aurais pas cru" HTTPSsub.mydomain/lt/v2/check
{"software":{"name":"LanguageTool","version":"5.7","buildDate":"2022-03-28 18:24:41 +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":"French","code":"fr","detectedLanguage":{"name":"French","code":"fr","confidence":0.9990271}},"matches":[{"message":"Un adverbe de négation doit être ajouté afin d’obtenir une négation complète.","shortMessage":"","replacements":[{"value":"je n'aurais"}],"offset":0,"length":8,"context":{"text":"j'aurais pas cru","offset":0,"length":8},"sentence":"j'aurais pas cru","type":{"typeName":"Other"},"rule":{"id":"P_V_PAS","subId":"1","sourceFile":"grammar.xml","description":"négation sans NE","issueType":"uncategorized","urls":[{"value":"HTTPwww.academie-francaise.fr/ne"}],"category":{"id":"CAT_GRAMMAIRE","name":"Grammaire"}},"ignoreForIncompleteSentence":true,"contextForSureMatch":15}]}
From both local and remote sources.
I tryed to configure coolwsd by setting the endpoint as default :
<languagetool desc="LanguageTool Remote API settings for grammar checking">
<enabled desc="Enable LanguageTool Remote Grammar Checker" type="bool" default="false">true</enabled>
<base_url desc="Http endpoint for the LanguageTool API server, without /check or /languages postfix at the end." type="string" default="PROTOSsub.mydomain/lt/v2/"></base_url>
[...]
</languagetool>
And by modifying the way the XML is formatted :
<languagetool desc="LanguageTool Remote API settings for grammar checking">
<enabled desc="Enable LanguageTool Remote Grammar Checker" type="bool" default="false">true</enabled>
<base_url desc="Http endpoint for the LanguageTool API server, without /check or /languages postfix at the end." type="string" default="">PROTOSsub.mydomain/lt/v2/</base_url>
[...]
</languagetool>
For every different configuration, I also tried to trigger LT by launching a manual spellcheck (and confirmed that the “check grammar” is on).
So far, the LanguageTool HTTP Server never saw a request from coolwsd or a Nextcloud client (I don’t know from which one I should wait a request).
I also switch logs to debug on coolwsd’s side and didn’t see anything that seem related to LanguageTool and I didn’t see anything either from my browser’s inspector (both Chromium and Firefox ESR).
I suppose it’s on me but I don’t know what I miss. Any clue ?
EDIT: PROTO is http:// and PROTOS is https://, I just it the “2 links” limit.