Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ doc/
build/
dist/
grobid_client_python.egg-info/
.venv
17 changes: 17 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ grobid_client [OPTIONS] SERVICE
| `--flavor` | Processing flavor for fulltext extraction |
| `--json` | Convert TEI output to JSON format |
| `--markdown` | Convert TEI output to Markdown format |
| `--typed_area` | Enable sending typed-area layout JSON to GROBID |
| `--typed_areas_dir` | Directory of pre-computed JSON files |
| `--typed_area_server` | URL of the PaddlePaddle server |


#### Examples
Expand All @@ -166,8 +169,22 @@ grobid_client --server https://grobid.example.com --input ~/citations.txt proces

# Force reprocessing with sentence segmentation and JSON output
grobid_client --input ~/docs --force --segment_sentences --json processFulltextDocument

# Typed Area Processing (with PaddlePaddle server)
# The client will fetch JSON from the paddle server and send it to Grobid
grobid_client --input ~/pdfs --output ~/results --typed_area --typed_area_server h processFulltextDocument

# Typed Area Processing (with pre-computed offline JSON files)
grobid_client --input ~/pdfs --output ~/results --typed_area --typed_areas_dir ~/precomputed_jsons processFulltextDocument
```

### Worker and Concurrency (Typed Areas)
When using the `--typed_area_server` flag, the Grobid client makes requests to *both* the PaddlePaddle server and the Grobid server.

- **Grobid Client Threads (`--n`)**: Controls how many PDFs are processed concurrently.
- **PaddlePaddle Server Workers (`--workers`)**: Controls how many concurrent layout requests the PaddlePaddle server can handle.

**Recommendation:** Set the PaddlePaddle server `--workers` to match the grobid-client `--n` threads (e.g., `--n 4` on the client and `--workers 4` on the server).
### Python Library

#### Basic Usage
Expand Down
Loading