grobid-client-python 0.0.5__py3-none-any.whl → 0.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- grobid_client/grobid_client.py +3 -3
- {grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/METADATA +4 -4
- grobid_client_python-0.0.7.dist-info/RECORD +9 -0
- grobid_client_python-0.0.5.dist-info/RECORD +0 -9
- {grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/LICENSE +0 -0
- {grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/WHEEL +0 -0
- {grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/entry_points.txt +0 -0
- {grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/top_level.txt +0 -0
grobid_client/grobid_client.py
CHANGED
|
@@ -79,13 +79,13 @@ class GrobidClient(ApiClient):
|
|
|
79
79
|
if output is not None:
|
|
80
80
|
input_file_name = str(os.path.relpath(os.path.abspath(input_file), input_path))
|
|
81
81
|
filename = os.path.join(
|
|
82
|
-
output, os.path.splitext(input_file_name)[0] + ".tei.xml"
|
|
82
|
+
output, os.path.splitext(input_file_name)[0] + ".grobid.tei.xml"
|
|
83
83
|
)
|
|
84
84
|
else:
|
|
85
85
|
input_file_name = ntpath.basename(input_file)
|
|
86
86
|
filename = os.path.join(
|
|
87
87
|
ntpath.dirname(input_file),
|
|
88
|
-
os.path.splitext(input_file_name)[0] + ".tei.xml",
|
|
88
|
+
os.path.splitext(input_file_name)[0] + ".grobid.tei.xml",
|
|
89
89
|
)
|
|
90
90
|
|
|
91
91
|
return filename
|
|
@@ -217,7 +217,7 @@ class GrobidClient(ApiClient):
|
|
|
217
217
|
# writing error file with suffixed error code
|
|
218
218
|
try:
|
|
219
219
|
pathlib.Path(os.path.dirname(filename)).mkdir(parents=True, exist_ok=True)
|
|
220
|
-
with open(filename.replace(".tei.xml", "_"+str(status)+".txt"), 'w', encoding='utf8') as tei_file:
|
|
220
|
+
with open(filename.replace(".grobid.tei.xml", "_"+str(status)+".txt"), 'w', encoding='utf8') as tei_file:
|
|
221
221
|
if text is not None:
|
|
222
222
|
tei_file.write(text)
|
|
223
223
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: grobid-client-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Simple python client for GROBID REST services
|
|
5
5
|
Home-page: https://github.com/kermitt2/grobid_client_python
|
|
6
6
|
Author: kermitt2
|
|
@@ -101,7 +101,7 @@ Examples:
|
|
|
101
101
|
> grobid_client --input ~/tmp/in2 --output ~/tmp/out processFulltextDocument
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
This command will process all the PDF files present under the input directory recursively (files with extension `.pdf` only) with the `processFulltextDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.tei.xml`), using the default `10` concurrent workers.
|
|
104
|
+
This command will process all the PDF files present under the input directory recursively (files with extension `.pdf` only) with the `processFulltextDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.grobid.tei.xml`), using the default `10` concurrent workers.
|
|
105
105
|
|
|
106
106
|
If `--output` is omitted, the resulting XML TEI documents will be produced alongside the PDF in the `--input` directory.
|
|
107
107
|
|
|
@@ -109,9 +109,9 @@ If `--output` is omitted, the resulting XML TEI documents will be produced along
|
|
|
109
109
|
> grobid_client --input ~/tmp/in2 --output ~/tmp/out --n 20 processHeaderDocument
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
This command will process all the PDF files present in the input directory (files with extension `.pdf` only) with the `processHeaderDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.tei.xml`), using `20` concurrent workers.
|
|
112
|
+
This command will process all the PDF files present in the input directory (files with extension `.pdf` only) with the `processHeaderDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.grobid.tei.xml`), using `20` concurrent workers.
|
|
113
113
|
|
|
114
|
-
By default if an existing `.tei.xml` file is present in the output directory corresponding to a PDF in the input directory, this PDF will be skipped to avoid reprocessing several times the same PDF. To force the processing of PDF and over-write of existing TEI files, use the parameter `--force`.
|
|
114
|
+
By default if an existing `.grobid.tei.xml` file is present in the output directory corresponding to a PDF in the input directory, this PDF will be skipped to avoid reprocessing several times the same PDF. To force the processing of PDF and over-write of existing TEI files, use the parameter `--force`.
|
|
115
115
|
|
|
116
116
|
`processCitationList` does not take a repertory of PDF as input, but a repertory of `.txt` files, with one reference raw string per line, for example:
|
|
117
117
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
grobid_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
grobid_client/client.py,sha256=crvUiVnnkn6tFwO4lKQg2cTxAHZxCBAmeNSVtuL4ZA0,6009
|
|
3
|
+
grobid_client/grobid_client.py,sha256=wHgfrA-HJUPaXgKz7LjKBJ7ol84Tj_vuDtA5HRbs6k4,16720
|
|
4
|
+
grobid_client_python-0.0.7.dist-info/LICENSE,sha256=L35Ao91pn_wG-mYDM3RfG7WKUjOnRmrCNHFSUQwXhKI,11184
|
|
5
|
+
grobid_client_python-0.0.7.dist-info/METADATA,sha256=vLlG2E2D4BNPGLmJJ187zfpp1IO14p9Ww6gkILugaUM,9862
|
|
6
|
+
grobid_client_python-0.0.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
7
|
+
grobid_client_python-0.0.7.dist-info/entry_points.txt,sha256=-WwPi8D8eXEbDB6QvitvHjxSGBeyLCyFvAoZcaDGswQ,67
|
|
8
|
+
grobid_client_python-0.0.7.dist-info/top_level.txt,sha256=HnjgWxdJNKTLIN86XkgRAfVeEK4C71fc9X4fe7qdMvA,14
|
|
9
|
+
grobid_client_python-0.0.7.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
grobid_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
grobid_client/client.py,sha256=crvUiVnnkn6tFwO4lKQg2cTxAHZxCBAmeNSVtuL4ZA0,6009
|
|
3
|
-
grobid_client/grobid_client.py,sha256=3QqFOvFcxeqRaWJ9kHmCcZDVvsYO-Ik3c6au1JxMWkI,16699
|
|
4
|
-
grobid_client_python-0.0.5.dist-info/LICENSE,sha256=L35Ao91pn_wG-mYDM3RfG7WKUjOnRmrCNHFSUQwXhKI,11184
|
|
5
|
-
grobid_client_python-0.0.5.dist-info/METADATA,sha256=KbHsmvfXUDKNyDDgfjkqgioKfd0hUPEzIitcvVb_rCg,9841
|
|
6
|
-
grobid_client_python-0.0.5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
7
|
-
grobid_client_python-0.0.5.dist-info/entry_points.txt,sha256=-WwPi8D8eXEbDB6QvitvHjxSGBeyLCyFvAoZcaDGswQ,67
|
|
8
|
-
grobid_client_python-0.0.5.dist-info/top_level.txt,sha256=HnjgWxdJNKTLIN86XkgRAfVeEK4C71fc9X4fe7qdMvA,14
|
|
9
|
-
grobid_client_python-0.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{grobid_client_python-0.0.5.dist-info → grobid_client_python-0.0.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|