kermitt2 / grobid_client_python

Python client for GROBID Web services
Apache License 2.0
275 stars 74 forks source link

Tei coordinates for multiple elements. #57

Closed rabia0001 closed 1 year ago

rabia0001 commented 1 year ago

when I am using form using grobid_client when I try to set up the tei_coordinates ='biblStruct' it works. But i wanted to also add tei_coordinates for ref and whatever I do it doesnt work, Do you know how can I set it up for that as well ? below is the code

form = ProcessForm( segmentsentences="1", input=File(file_name=pdf_file.name, payload=f, mime_type="application/pdf"),consolidate_citations="1",tei_coordinates='biblStruct' ) r = process_fulltext_document.sync_detailed(client=client, multipart_data=form)

kermitt2 commented 1 year ago

Hi @rabia0001

There is no ProcessForm() in this client.

My answer bellow is relative to the present client.

Elements with coordinates are defined in the config.json file by default: https://github.com/kermitt2/grobid_client_python/blob/master/config.json#L6

With the client command line, use --teiCoordinates. With the library tei_coordinates=True (see example.py).

rabia0001 commented 1 year ago

Thank you. I think I am grobid_client from pyPi and its confusing me. If I set it to ter_coordinates=True, it doesnt do anything.

kermitt2 commented 1 year ago

I am afraid, you're at the wrong place :D Here is https://pypi.org/project/grobid-client-python and all coordinates are returned by default with tei_coordinates=True.

kermitt2 commented 1 year ago

closing the issue because not related to this tool