-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathexample.py
More file actions
14 lines (11 loc) · 991 Bytes
/
example.py
File metadata and controls
14 lines (11 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from grobid_client.grobid_client import GrobidClient
if __name__ == "__main__":
# Example 1: Using config file values (no constructor parameters)
client = GrobidClient(config_path="./config.json")
client.process("processFulltextDocument", "./resources/test_pdf", output="./resources/test_out/", consolidate_citations=True, tei_coordinates=True, force=True)
# Example 2: Overriding config file with explicit server parameter
# client = GrobidClient(grobid_server="https://lfoppiano-grobid.hf.space", config_path="./config.json")
# client.process("processFulltextDocument", "./resources/test_pdf", output="./resources/test_out/", consolidate_citations=True, tei_coordinates=True, force=True)
# Example 3: Using default values (no config file, no parameters)
# client = GrobidClient()
# client.process("processFulltextDocument", "./resources/test_pdf", output="./resources/test_out/", consolidate_citations=True, tei_coordinates=True, force=True)