Skip to main content

fuzzycat: bibliographic fuzzy matching for fatcat.wiki

https://pypi.org/project/fuzzycat/

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.

Metadata

Release files for fuzzycat 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fuzzycat 0.1.23
File Size Uploaded
fuzzycat-0.1.23.tar.gz 76.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fuzzycat 0.1.23
File Interpreter ABI Platform
fuzzycat-0.1.23-py3-none-any.whl Python 3 none any Details

Total release size: 154.3 kB

Release files / fuzzycat-0.1.23.tar.gz

Download URL fuzzycat-0.1.23.tar.gz
Size 76.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dfeafbd0caaaf40e488c9c33b7464a4908dcff0c3b3592ef50d5562c8560293c
BLAKE2b-256 checksum
How to use checksums
ff9119a75e56b496384ca5635de7640cc50ef0de75853b1ce3c758ea6e85cdb0
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / fuzzycat-0.1.23-py3-none-any.whl

Download URL fuzzycat-0.1.23-py3-none-any.whl
Size 77.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92b875c64df2e691558d6a25ec22322ccc440963c1ad360468cc9041430fb377
BLAKE2b-256 checksum
How to use checksums
f76c4aaa406faac082c145779dd89eb57aacf14f4bcaae135ac657fa482d5845
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.23 This release

2 release files

0.1.22

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page