kermitt2 / grobid_client_python

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

Python library #8

Closed TheoDlmz closed 4 years ago

TheoDlmz commented 4 years ago

Method 2: Install using pip directly from github:

pip install git+https://github.com/kermitt2/grobid-client-python.git

This will download, build and install the client as a library in your standard python environment. You will be able to import it in your python stuff but for using the command lines you will need to use the above Method 1.

Hi, I would like to call Grobid directly from Python but after doing the above code, I can't find any library related to Grobid in my pip environment. What is the name of this library? On the sites-packages folder, I only have a grobid_client_python-0.0.1.dist-info folder which contains metadata about the library.

Thanks by advance

kermitt2 commented 4 years ago

Hi Theo,

Yes it doesn't work... It was from a PR https://github.com/kermitt2/grobid-client-python/pull/4, but then I didn't test the usage as a module.

After this install I have indeed the module listed with pip

> pip list
...
grobid-client-python (0.0.1)
...

but I don't manage to import it (maybe the dash in the name). I'll remove this method 2, sorry.

TheoDlmz commented 4 years ago

Thanks for your response! No problem. I finally imported only the client.py as in grobid-client-python.py to get what I wanted.

kermitt2 commented 4 years ago

Yes it's the easiest way ! I modified the readme and put an example of import test.py.

(to be honest this client is half done ;) we should make a proper module, remove the dash, add more Grobid services...)