kermitt2 / grobid_client_python

Python client for GROBID Web services
Apache License 2.0
279 stars 75 forks source link

Make into package #26

Closed gchers closed 3 years ago

gchers commented 3 years ago

Hi,

This PR makes it possible to install grobid_client as a package. This implies the following changes:

I also updated the readme with new instructions. However, since it does change the way the script was initially wrote, eel free to accept/not accept, as you like.

This should fix issue #14

mathias-goebel commented 3 years ago

Hi. Here is just another guy from the internet confirming that this is a working increment. Special thanks to the author for editing the README.md as well.

kermitt2 commented 3 years ago

Thank you very much @gchers once again for your contribution and this improvement, and @mathias-goebel from the internet for the confirmation! We started with a toy script to illustrate how to use the grobid service, and now we have a decent package.

kermitt2 commented 3 years ago

@gchers two things:

from grobid_client.grobid_client import GrobidClient

if __name__ == "__main__":
    client = GrobidClient(config_path="./config.json")
    client.process("processFulltextDocument", "./resources/test", output="./resources/test_out/", consolidate_citations=True, teiCoordinates=True, force=True)

(maybe it could be re-named rather example.py)

Thanks !

gchers commented 3 years ago

Hi there!

I merged from upstream, adapted the test.py as you indicated, moved test.py to root (now it's called example.py), and adapted the readme (wherever I could find a mention of that file).

Let me know if you see any further breaking changes.

Cheers

kermitt2 commented 3 years ago

Super, thank you @gchers !