I kept turning messy reference lists into BibTeX by hand. GROBID is the standard tool, and it is good. It is also a Java server, and on less common citation styles it often gets the title or the journal wrong.
citeparse is a small token-classification model (32M or 150M parameters, Apache-2.0) in a pip package. You give it one reference per line and get CSL-JSON or BibTeX back. The 32M model parses about 118 references a second on a laptop CPU. There is also a browser demo where the model runs on the page: https://huggingface.co/spaces/hedwigai/citeparse pip install citeparse
citeparse refs.txt --bibtex
citeparse check refs.txt
For the benchmark I wanted labels nobody wrote by hand. So I took 700 reference strings exactly as publishers deposited them with Crossref, and scored each against the Crossref record of the DOI it cites. None of those DOIs were in training. GROBID 0.8.1 gets 71.1% of references fully right, and citeparse-150m gets 83.4%. GROBID still wins on its own held-out set (0.943 vs 0.900 field accuracy), which comes from the same sources as its training data. citeparse check looks each parsed reference up on Crossref (and OpenAlex if you have a key). It reports ok, mismatch (the DOI points to a different paper), unregistered DOI, or not found. I tested it on 100 real references with their DOIs removed, and on 83 fakes made by putting one paper's title on another paper's authors and year. It accused none of the real ones. 89 matched and 11 came back "not found": old physics references with no title, an Italian law chapter, a Russian book. 80 of the 83 fakes came back "not found". So "not found" means "look at this one by hand", not "this is fake". The command exits 1 on a mismatch or a bad DOI, so it can run in CI on a paper's .bib. Training data is GROBID's citation corpus (Apache-2.0) with its evaluation files removed, plus Crossref records (CC0) written out in 11 citation styles. The rebuild and benchmark scripts are in the repo, and the test set is on Hugging Face. Write-up: https://www.hedwigai.com/blog/citeparse-reference-parsing I'd like to hear where it breaks. I expect non-English references, law and humanities styles, and entries with editors to be the weak spots.
All comments shown.
Couldn't load more comments. Check your connection and try again.
Comments (1) 1 thread
citeparse is a small token-classification model (32M or 150M parameters, Apache-2.0) in a pip package. You give it one reference per line and get CSL-JSON or BibTeX back. The 32M model parses about 118 references a second on a laptop CPU. There is also a browser demo where the model runs on the page: https://huggingface.co/spaces/hedwigai/citeparse
pip install citeparse citeparse refs.txt --bibtex citeparse check refs.txt For the benchmark I wanted labels nobody wrote by hand. So I took 700 reference strings exactly as publishers deposited them with Crossref, and scored each against the Crossref record of the DOI it cites. None of those DOIs were in training. GROBID 0.8.1 gets 71.1% of references fully right, and citeparse-150m gets 83.4%. GROBID still wins on its own held-out set (0.943 vs 0.900 field accuracy), which comes from the same sources as its training data.
citeparse check looks each parsed reference up on Crossref (and OpenAlex if you have a key). It reports ok, mismatch (the DOI points to a different paper), unregistered DOI, or not found. I tested it on 100 real references with their DOIs removed, and on 83 fakes made by putting one paper's title on another paper's authors and year. It accused none of the real ones. 89 matched and 11 came back "not found": old physics references with no title, an Italian law chapter, a Russian book. 80 of the 83 fakes came back "not found". So "not found" means "look at this one by hand", not "this is fake". The command exits 1 on a mismatch or a bad DOI, so it can run in CI on a paper's .bib.
Training data is GROBID's citation corpus (Apache-2.0) with its evaluation files removed, plus Crossref records (CC0) written out in 11 citation styles. The rebuild and benchmark scripts are in the repo, and the test set is on Hugging Face.
Write-up: https://www.hedwigai.com/blog/citeparse-reference-parsing
I'd like to hear where it breaks. I expect non-English references, law and humanities styles, and entries with editors to be the weak spots.
All comments shown.
Couldn't load more comments. Check your connection and try again.