Skip to content

use current Languagetool api#38

Closed
leej3 wants to merge 1 commit intoFindus23:masterfrom
leej3:use_current_api
Closed

use current Languagetool api#38
leej3 wants to merge 1 commit intoFindus23:masterfrom
leej3:use_current_api

Conversation

@leej3
Copy link

@leej3 leej3 commented Mar 17, 2019

@leej3
Copy link
Author

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/

@Findus23
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

leej3 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants