diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-10-26 17:29:52 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-10-26 17:29:52 -0700 |
commit | b68cd877cac1d7ca77a8e5055f4f12b70f8190c6 (patch) | |
tree | 36f51696d9a1a61dd897f9375679291af1a9e413 | |
parent | 8cf887240bff6c0ccbffa9f9003f90bfa2c94b4f (diff) | |
download | sandcrawler-b68cd877cac1d7ca77a8e5055f4f12b70f8190c6.tar.gz sandcrawler-b68cd877cac1d7ca77a8e5055f4f12b70f8190c6.zip |
grobid: fix a bug with consolidate_mode header, exposed by type annotations
-rw-r--r-- | python/sandcrawler/grobid.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/sandcrawler/grobid.py b/python/sandcrawler/grobid.py index a44861a..ae96fc8 100644 --- a/python/sandcrawler/grobid.py +++ b/python/sandcrawler/grobid.py @@ -28,13 +28,14 @@ class GrobidClient(object): if consolidate_mode is None: consolidate_mode = self.consolidate_mode + assert consolidate_mode is not None try: grobid_response = requests.post( self.host_url + "/api/processFulltextDocument", files={ 'input': blob, - 'consolidateHeader': self.consolidate_mode, + 'consolidateHeader': consolidate_mode, 'consolidateCitations': 0, # too expensive for now 'includeRawCitations': 1, }, |