Add support for LanguageTool Plus
TeXstudio already offers a LanguageTool integration, but it is currently not compatible with LanguageTool Plus. LanguageTool Plus is a hosted service and offers additional rules compared to the free version.
Would it be possible to add support for LanguageTool Plus? The API is 100% identical to the free version, only missing are username and password fields for authentication. Daniel Naber from LanguageTool Plus mentioned via email that a free LanguageTool Plus account would be provided for testing.
what is the url supposed to look like. I have not seen a description (yet).
How sad, nobody provided any information: the API is described here LanguageTool Plus API.
Hence, the URL and the response are very similar to the regular version.
Here one example for the url:
https://api.languagetoolplus.com/v2/check?text=<encoded Text under Test, i.e.: %3CText%20under%20Test%3E>&language=<language of the interface, i.e. "de-DE">&username=<encoded (@=%40)e-mail address of account>&password=<Accounts Password>&enabledOnly=false
alternatively to &password=<Accounts Password> the use of an api-key is possible with &apiKey=<API-Key>
The JSON-response (in case of an error oly recognized by LTplus) looks like
{"software":{"name":"LanguageTool","version":"4.6-SNAPSHOT","buildDate":"2019-06-18 13:58","apiVersion":1,"premium":true,"status":""},"warnings":{"incompleteResults":false},"language":{"name":"German (Germany)","code":"de-DE","detectedLanguage":{"name":"German (Germany)","code":"de-DE","confidence":0.891}},"matches":[{"message":"Meinten Sie \"äußert sich\" oder \"äußerst dich\", oder fehlt hier ein Komma?","shortMessage":"","replacements":[{"value":"äußert sich"},{"value":"äußerst dich"}],"offset":3,"length":12,"context":{"text":"Er äußerst sich nicht dazu.","offset":3,"length":12},"sentence":"Er äußerst sich nicht dazu.","type":{"typeName":"Other"},"rule":{"id":"AEUSSERST_SICH","subId":"1","description":"äußerst (äußert) sich","issueType":"uncategorized","category":{"id":"TYPOS","name":"Mögliche Tippfehler"},"isPremium":true},"ignoreForIncompleteSentence":false,"contextForSureMatch":0}]}
The ordering of the elements in the URL seems not to be relevant.
Is there any update on this? Also waiting for the support for LT Plus. It seems that the version 3.0.0rc1 does not have the option to add a username for LT Plus.
Meanwhile, you can change the LanguageTool Server-URL to the LanguageTool Plus URL like so:
https://api.languagetoolplus.com/v2/check?username=<YOUR E-MAIL>&apiKey=<YOUR API-KEY>&null=
The &null= at the end is important because TexStudio will append /v2/check to the URL, which would otherwise be invalid.
The result would then look like this: