Created a download argument for running the client #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
Myself and my colleagues at NASA Jet Propulsion Laboratory got to use the Grobid Python Client for an internal project and have found it extremely useful for parsing scientific papers and extracting useful information from them. Grobid is certainly one of the most incredible parsing tools out there and it has helped us tremendously, so thank you so much for all your work!
Something that we really wanted to use the client for was the ability to parse the PDFs without downloading the output XMLs locally. I didn't see it as an option/argument for the client so I created it and added it to the code. In short, passing the
--download
flag asFalse
will save the output in a cache represented by a list of tuples, where each tuple represents a file and it contains the filename, the path, and the XML output in a string form. Later on, the cache (client.cache
) can be used for further parsing if need be (see an example intest-cache.py
). Passing the--download
flag asTrue
will save the XML files locally, as the client did before my modifications.I wanted to share my modifications in case they could be of use to others. Please let me know if you have any questions or concerns!
Anastasija