Skip to content

Commit

Permalink
fix parameters mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Jan 24, 2025
1 parent 481ceff commit b3c6049
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions grobid_client/grobid_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def process_batch(
include_raw_affiliations,
tei_coordinates,
segment_sentences,
flavor)
flavor,
-1,
-1)

results.append(r)

Expand Down Expand Up @@ -261,9 +263,9 @@ def process_pdf(
include_raw_affiliations,
tei_coordinates,
segment_sentences,
flavor=None,
start=-1,
end=-1,
flavor=None
end=-1
):
pdf_handle = open(pdf_file, "rb")
files = {
Expand Down Expand Up @@ -300,6 +302,8 @@ def process_pdf(
if end > 0:
the_data["end"] = str(end)

the_data["includeDiscardedText"] = "1"

try:
res, status = self.post(
url=the_url, files=files, data=the_data, headers={"Accept": "text/plain"}, timeout=self.config['timeout']
Expand All @@ -318,7 +322,8 @@ def process_pdf(
tei_coordinates,
segment_sentences,
start,
end
end,
flavor
)
except requests.exceptions.ReadTimeout:
pdf_handle.close()
Expand Down

0 comments on commit b3c6049

Please sign in to comment.