Parse, verify, and highlight questionable academic references — catch fabricated or erroneous citations before they catch you.
ref-verifier is an R-based utility that validates bibliographic references by:
- Parsing plain-text references (APA, MLA, Chicago)
- Verifying DOIs via the Crossref API
- Cross-checking publisher and ISSN metadata
- Running title searches via Crossref and OpenAlex if DOI is missing or invalid
- Scoring matches using title similarity, author surname overlap, and year proximity
- Producing a color-coded
gttable for quick review
Ideal for:
- Journal editors verifying manuscript references
- Peer reviewers checking citation accuracy
- Researchers cleaning up bibliographies
- ✅ Supports APA, MLA, and Chicago formats
- 🔍 DOI and title-based verification
- 🧠 Intelligent scoring system for match confidence
- 🎨 Interactive, color-coded output via
gt - 🌐 Integrates with Crossref and OpenAlex APIs
Create a plain-text file (e.g., references.txt) with one reference per line.
DOIs may be included or omitted.
Example:
Smith, J. (2020). Example Article. Journal of Examples, 12(3), 45–56. https://doi.org/10.1234/example
Doe, A. (2019). Another Study. Example Journal, 5(2), 100–110.
source("R/ref-verifier.R")
results <- verify_references("references.txt")View in RStudio’s Viewer pane or export to HTML:
gt::gtsave(results, "verification_report.html")Color codes:
- 🟢 Green — high confidence match
- 🟡 Yellow — partial match or minor discrepancies
- 🔴 Red — likely incorrect or fabricated
# Load the script
source("R/ref-verifier.R")
# Verify references from file
results <- verify_references("my_refs.txt")
# Save the report
gt::gtsave(results, "my_report.html")Open my_report.html in your browser to view the results.
-
Clone the repository
git clone https://github.com/salvatoremaione/ref-verifier.git cd ref-verifier -
Install required R packages
install.packages(c( "dplyr", "purrr", "tibble", "readr", "stringi", "stringdist", "httr", "jsonlite", "stringr", "gt" ))
-
Open the project
Use R or RStudio in the cloned project directory.
flowchart TD
A([Start]) --> B[Read references file]
B --> C{DOI present?}
C -- Yes --> D[[Clean DOI & Query Crossref]]
C -- No --> E[[Search by Title via Crossref & OpenAlex]]
D --> F[Retrieve metadata]
E --> F
F --> G[Compare with reference data]
G --> H[Calculate match score]
H --> I[Assign color code]
I --> J[[Generate GT table output]]
J --> K([End])
click D href "https://api.crossref.org" "Open Crossref API documentation"
click E href "https://docs.openalex.org/api" "Open OpenAlex API documentation"
click J href "https://gt.rstudio.com/" "Open GT package documentation"
Step breakdown:
- DOI Check — Cleans DOI (if present) and queries Crossref for metadata.
- Metadata Match — Compares publisher, ISSN, year, and title for mismatches.
- Fallback Search — Uses Crossref and OpenAlex title search if DOI fails or is missing.
- Scoring — Combines:
- Title similarity (string distance)
- Author surname overlap
- Year proximity
- Color Coding — Assigns traffic-light colors for quick match confidence review.
- Output — Generates a
gttable for easy inspection.
- Requires internet access for API queries
- Accuracy depends on metadata quality in Crossref/OpenAlex
- Non-English references may have lower match accuracy
MIT License — see LICENSE for details.