Fuzzy matching utilities for scholarly metadata
Project description
fuzzycat
: bibliographic fuzzy matching for fatcat.wiki
This Python library contains routines for finding near-duplicate bibliographic entities (primarily research papers), and estimating whether two metadata records describe the same work (or variations of the same work). Some routines are designed to work "offline" with batches of billions of sorted metadata records, and others are designed to work "online" making queries against hosted web services and catalogs.
fuzzycat
was originally developed by Martin Czygan at the Internet Archive,
and is used in the construction of a citation
graph and to identify duplicate
records in the fatcat.wiki catalog and
scholar.archive.org search index.
DISCLAIMER: this tool is still under development, as indicated by the "0" major version. The interface, semantics, and behavior are likely to be tweaked.
Quickstart
Inside a virtualenv
(or similar), install with pip:
pip install fuzzycat
The fuzzycat.simple
module contains high-level helpers which query Internet
Archive hosted services:
import elasticsearch
from fuzzycat.simple import *
es_client = elasticsearch.Elasticsearch("https://search.fatcat.wiki:443")
# parses reference using GROBID (at https://grobid.qa.fatcat.wiki),
# then queries Elasticsearch (at https://search.fatcat.wiki),
# then scores candidates against latest catalog record fetched from
# https://api.fatcat.wiki
best_match = closest_fuzzy_unstructured_match(
"""Cunningham HB, Weis JJ, Taveras LR, Huerta S. Mesh migration following abdominal hernia repair: a comprehensive review. Hernia. 2019 Apr;23(2):235-243. doi: 10.1007/s10029-019-01898-9. Epub 2019 Jan 30. PMID: 30701369.""",
es_client=es_client)
print(best_match)
# FuzzyReleaseMatchResult(status=<Status.EXACT: 'exact'>, reason=<Reason.DOI: 'doi'>, release={...})
# same as above, but without the GROBID parsing, and returns multiple results
matches = close_fuzzy_biblio_matches(
dict(
title="Mesh migration following abdominal hernia repair: a comprehensive review",
first_author="Cunningham",
year=2019,
journal="Hernia",
),
es_client=es_client,
)
A CLI tool is included for processing records in UNIX stdin/stdout pipelines:
# print usage
python -m fuzzycat
Features and Use-Cases
The refcat project builds on top of this library to build a citation graph by processing billions of structured and unstructured reference records extracted from scholarly papers (note: jfor performance critical parts, some code has been ported to Go, albeit the test suite is shared between the Python and Go implementations).
Automated imports of metadata records into the fatcat catalog use fuzzycat to filter new metadata which look like duplicates of existing records from other sources.
In conjunction with standard command-line tools (like sort
), fatcat bulk
metadata snapshots can be clustered and reduced into groups to flag duplicate
records for merging.
Extracted reference strings from any source (webpages, books, papers, wikis, databases, etc) can be resolved against the fatcat catalog of scholarly papers.
Support and Acknowledgements
Work on this software received support from the Andrew W. Mellon Foundation through multiple phases of the "Ensuring the Persistent Access of Open Access Journal Literature" project (see original announcement).
Additional acknowledgements at fatcat.wiki.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fuzzycat-0.1.23.tar.gz
.
File metadata
- Download URL: fuzzycat-0.1.23.tar.gz
- Upload date:
- Size: 76.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfeafbd0caaaf40e488c9c33b7464a4908dcff0c3b3592ef50d5562c8560293c |
|
MD5 | c71c31be6f7a156c320c878de60d5214 |
|
BLAKE2b-256 | ff9119a75e56b496384ca5635de7640cc50ef0de75853b1ce3c758ea6e85cdb0 |
File details
Details for the file fuzzycat-0.1.23-py3-none-any.whl
.
File metadata
- Download URL: fuzzycat-0.1.23-py3-none-any.whl
- Upload date:
- Size: 77.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b875c64df2e691558d6a25ec22322ccc440963c1ad360468cc9041430fb377 |
|
MD5 | 77cb2c650424b10393bf3977ffd4abd3 |
|
BLAKE2b-256 | f76c4aaa406faac082c145779dd89eb57aacf14f4bcaae135ac657fa482d5845 |