Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enable using the web version of the language tool. #52

Open
markokocic opened this issue Jun 29, 2020 · 3 comments
Open

Feature: Enable using the web version of the language tool. #52

markokocic opened this issue Jun 29, 2020 · 3 comments

Comments

@markokocic
Copy link

Allow option to connect to and use the remote web version of language tool without installing the language server itself.

@markokocic
Copy link
Author

I configured langtool the following way:

(use-package langtool
  :ensure t :defer t
  :custom
  (langtool-http-server-host "languagetool.org")
  (langtool-http-server-port 443)
  (langtool-http-server-stream-type 'ssl)
  )

I also changed langtool-client-http-post to post to /api/v2/check instead of /v2/check

In theory, that should be enough to use https://languagetool.org/api/v2/ as a language server. However, when trying to call it from emacs, I get the following error:

error in process sentinel: langtool-http--parse-response-header: Parse error. Not found http header separator.
error in process sentinel: Parse error. Not found http header separator.

@PillFall
Copy link

That wouldn't be possible as the LanguageTool Online Server only meant to be used as a test server, if you do more than 20 request in a minute, you will be banned from the server.

http://wiki.languagetool.org/public-http-api [20 requests per IP per minute (this is supposed to be a peak value - don't constantly send this many requests or we would have to block you)]

@dotgreg
Copy link

dotgreg commented Dec 11, 2021

As @PillFall mentionned, that should not be used for other purpose than testing.
Working if changed to :

(use-package langtool :ensure t) 
(setq langtool-http-server-stream-type 'ssl) 
(setq langtool-http-server-host "api.languagetool.org")
(setq langtool-http-server-port 443)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants