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

use current Languagetool api #38

Closed
wants to merge 1 commit into from
Closed

Conversation

@leej3
Copy link

@leej3 leej3 commented Mar 17, 2019

as described in:
http://wiki.languagetool.org/public-http-api

@leej3
Copy link
Author

@leej3 leej3 commented Mar 17, 2019

Perhaps just documentation of the expected url for the --api-url option would work though...

As in:

java -cp /opt/LanguageTool-4.4/languagetool-server.jar org.languagetool.server.HTTPServer --port 8010
pylanguagetool <input_file> --api-url http://localhost:8010/v2/

Loading

@Findus23
Copy link
Owner

@Findus23 Findus23 commented Mar 17, 2019

Hi,

Thanks for contributing.

Honestly I consider the /v2/ part of the URL the user has to specify (and the whole project is based on the v2 API you linked to)
So the default URL used is https://languagetool.org/api/v2/ as you can see here:

p.add_argument("-a", "--api-url", env_var="API_URL", default="https://languagetool.org/api/v2/")

And I have configured pylanguagetool to use https://languagetool.example/v2/

Loading

@Findus23 Findus23 closed this in 4002c04 Mar 17, 2019
@Findus23
Copy link
Owner

@Findus23 Findus23 commented Mar 17, 2019

But you are right that this isn't intuitive, so I added a help to the parameter mentioning that it should always end in /v2/ (4002c04)

Loading

@leej3
Copy link
Author

@leej3 leej3 commented Mar 17, 2019

Agreed. Thanks for the quick response/fix. And for providing the nice utility.

Loading

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

Successfully merging this pull request may close these issues.

None yet

2 participants