Collecting Citations from Text

Rebecca Hedreen

Published: 2023-04-19 DOI: 10.17504/protocols.io.bp2l6bkq5gqe/v2

Disclaimer

DISCLAIMER – FOR INFORMATIONAL PURPOSES ONLY; USE AT YOUR OWN RISK

The protocol content here is for informational purposes only and does not constitute legal, medical, clinical, or safety advice, or otherwise; content added to protocols.io is not peer reviewed and may not have undergone a formal approval of any kind. Information presented in this protocol should not substitute for independent professional judgment, advice, diagnosis, or treatment. Any action you take or refrain from taking using or relying upon the information presented here is strictly at your own risk. You agree that neither the Company nor any of the authors, contributors, administrators, or anyone else associated with protocols.io, can be held responsible for your use of the information contained in or linked to this protocol or any of our Sites/Apps and Services.

Abstract

Basic steps and scripts used for translating text citations to bibtex files suitable for loading into citation management software or citation analysis scripts. 4 publically available webpage mounted scripts are suggested, that require no programming.

Updated in April 2023 to include a ChatGPT option

Steps

Preparing text file

1.

Copy citations from the source document(s) into a text (.txt) document.

Note
The Preparation steps are not required to use ChatGPT (step 3.4) to produce bibtex, but may produce cleaner output.

2.

Edit the text document so that each citation is on a separate line with one blank line between each citation. Not all the scripts require a blank line between citations, but it does improve readability and importing.

Note
A text editor that includes line numbers (the type used by software programmers) makes this step easier.

Processing citations

3.

I've found 4 web-mounted scripts that will do text file to bibtex file translation. Only one is needed to produce a bib file - different text citation formats may work better in different systems, however.

3.1.

Anystyle.io can be used on the web, or as a Ruby script. This is the most flexible script and it allows detailed editing before the final file export. The website is privately hosted, so it's not always been available. https://anystyle.io/

Software

ValueLabel
Anystyle.ioNAME
https://github.com/inukshuk/anystyleREPOSITORY
Sylvester Keil, inukshuk on githubDEVELOPER
https://anystyle.io/LINK

Citation
.bib file

3.2.

This PERL script is mounted on a website and will do basic translation. No support, but it's quite good. http://www.snowelm.com/~t/doc/tips/makebib.perl.cgi

Software

ValueLabel
makebib.perl scriptNAME
Makino TakakiDEVELOPER
http://www.snowelm.com/~t/doc/tips/makebib.en.htmlLINK

Citation
.bib file

3.3.

Hosted by the University of Toronto. Requires registration. Basic editing and checking in Google Scholar is available. Accurate and reliable. https://text2bib.economics.utoronto.ca/

Software

ValueLabel
Text2BibNAME
J. O. Martin and Fabian Qifei BaiDEVELOPER
https://text2bib.economics.utoronto.ca/LINK

Citation
.bib file

3.4.

ChatGPT can take text citations, even with errors or in non-standard formats, and format them as bibtex with high accuracy. While it is not required to process the text as much as for the other services, it may make it easier to be sure you are getting the correct number of fully formatted citations. The following prompt has worked well, but variations should work as well.

#ChatGPT Produce bibtex 
"Generate bibtex formatting for the following citations. Put all the bibtex in one place for easier copying." Paste the citations following the prompt. 

Software

ValueLabel
ChatGPTNAME
https://chat.open.aiREPOSITORY
OpenAIDEVELOPER
3.5VERSION

Note
Directing ChatGPT to put all the bibtex in "one place" stops it from producing individual entries that must be copied separately. This also seems to prevent it from stalling out partway through the citation list.There are word/character limits in most versions of ChatGPT, so it's necessary to break up large lists into smaller numbers of citations.

Citation
The output is in ChatGPT's code output. In the web version of ChatGPT (as opposed to the API), there is a Copy Code at the top of the code block. The copied text can be added to a text file for later importing into citation managers or imported into Zotero using the Import from Clipboard option.

Export

4.

Once the script has exported a .bib file, load it into your citation manager of choice. Zotero has been the most reliable for importing. Zotero also has an option to "Import from Clipboard" if the output is available for copy & paste.

Software

ValueLabel
ZoteroNAME
ZoteroDEVELOPER
http://www.zotero.orgLINK

Note
Zotero also produces more standardized .bib and .ris files than the scripts, especially the older scripts. I have imported into Zotero, exported a bib file, and imported into other software if a direct import didn't work.

推荐阅读

Nature Protocols
Protocols IO
Current Protocols
扫码咨询