-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for application/x-bibtex type #532
Conversation
Sorry Oliver for being so slow to review the PR! No problem to add the bibtex response type of course. Just two questions,
|
It's good enough to integrate it in JabRef. We have one major issue: The names are not in the format We see that the date parsing is not that easy. So following example
appears as follows in JabRef: @Article{KolbApril7102014,
author = {S Kolb and G Wirtz},
year = {April 7 - 10, 2014},
address = {Oxford, United Kingdom},
booktitle = {Towards Application Portability in Platform as a Service Proceedings of the 8th IEEE International Symposium on Service-Oriented System Engineering (SOSE)},
} We have no issues in converting Nevertheless, we experienced no issues in parsing the result and integrating it in JabRef.
Done. 😅 |
Think, my tests are too straight-forward. Maybe, I should start a REST server and then use http://rest-assured.io/ ^^.
Would it be OK to disable the tests for now to include the functionality in the main branch? |
- Add some exception logging - Use == for enums
I think, in the long run, |
Thank you @koppor for making the test passing!
yes actually this is the whole idea of using TEI as unique output format for GROBID. Then the other legion of "degraded" formats can simply be derived from the TEI via XSLT. It's probably a bad idea to output directly BibTeX given how ambiguous and presentation-oriented the format is (it's why I didn't touch the Probably the last thing to be done is to update the web service documentation, under |
I wonder whether MODS should be used as XML format. Is there an ADR for TEI ^^. Meanwhile, I also worked on the BibTeX output heuristics. I also added/enabled basic tests for the URLs provided at "Service checks" Linted the markdown file using https://github.com/DavidAnson/markdownlint (the visual studio code plugin: https://github.com/DavidAnson/vscode-markdownlint). |
See https://github.com/koppor/grobid/blob/add-bibtex-accept/doc/Grobid-service.md#apiprocessreferences for the documentation added. Tried to use |
Well MODS covers only the biblio, so as GROBID requires to encode a complete text body it's not a valid choice. For the biblio, TEI is actually more comprehensive too, MODS has almost nothing to encode the affiliation information (there are other small issues with MODS). The only other valid candidate would be JATS, but it's a bit a mess with many flavors/freedom, and it's focusing on article only. For GROBID, we need to cover, full monograph, patents, standards, etc. and TEI is simply more comprehensive. TEI has also nice customization mechanism to define a non-ambiguous encoding. end of ADR :D |
Thank you for the ADR ^^. I did not do any more changes, since both travis and coveralls is green, I think, the update is complete 😇 |
Yes and thank you so much for the extensive corrections in the |
Doing some test, the lopez@work:~/grobid$ curl -X POST -H "Accept: application/x-bibtex" -d "citations=Graff, Expert. Opin. Ther. Targets (2002) 6(1): 103-113" localhost:8070/api/processCitation
@article{-1,
author = {Graff, null},
journal = {Expert. Opin. Ther. Targets},
year = {2002},
pages = {103--113},
volume = {6},
number = {1}
} |
Fixed. Added test using your example. Added the example to Also refined |
Thanks a lot Oliver for all the improvements you introduced and the feature contribution! |
As I caller, I want to have BibTeX as output (instead of XML). This PR adds that functionality. A caller has to send the HTTP header
Accept: application/x-bibtex
The implementation tries to keep the existing code as much as possible. Thus, the modification of the
processCitation
method with an additional parameter.