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

Conversation

@leej3
Copy link

commented Mar 17, 2019

@leej3

This comment has been minimized.

Copy link
Author

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/
@Findus23

This comment has been minimized.

Copy link
Owner

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/

@Findus23 Findus23 closed this in 4002c04 Mar 17, 2019

@Findus23

This comment has been minimized.

Copy link
Owner

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)

@leej3

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.