Skip to main content

A Fuzzy Matching Approach for Clustering Strings

Project description

Fuzz Up [W.I.P.]

Build status codecov PyPI PyPI - Downloads License

fuzzup offers a simple approach for clustering string entitities based on Levenshtein Distance using Fuzzy Matching in conjunction with a simple rule-based clustering method.

fuzzup also provides functions for computing the prominence of the resulting entity clusters and to match them with entity whitelists.

An important use-case for fuzzup is organizing, structuring and analyzing output from Named-Entity Recognition(=NER). fuzzup also provides (2) functions for computing the prominence of the resulting entity clusters resulting from (1) as well as whitelist matching (3).

fuzzup has been designed to fit the output from NER predictions from the Hugging Face transformers NER pipeline specifically.

Installation guide

fuzzup can be installed from the Python Package Index (PyPI) by:

pip install fuzzup

If you want the development version then install directly from Github.

Workflow

fuzzup offers functionality for:

  1. Computing all of the mutual string distances (Levensteihn Distances/fuzzy ratios) between the string entities
  2. Forming clusters of string entities based on the distances from (1)
  3. Computing prominence of the clusters from (2) based on the number of entity occurrences, their positions in the text etc.
  4. Matching entities (clusters) with entity whitelists

Together these steps constitute an end-to-end approach for organizing and structuring the output from NER. Here is an example of how to use fuzzup for forming entity clusters based on edit distances.

To do

  • document whitelist matching in showcase
  • update readme with workflow
  • tests for whitelist
  • cutoff_threshold -> score_cutoff -> cdist
  • try and tune on junges entitites
  • run against tores list
  • document whitelist
  • update docs

Background

fuzzup is developed as a part of Ekstra Bladet’s activities on Platform Intelligence in News (PIN). PIN is an industrial research project that is carried out in collaboration between the Technical University of Denmark, University of Copenhagen and Copenhagen Business School with funding from Innovation Fund Denmark. The project runs from 2020-2023 and develops recommender systems and natural language processing systems geared for news publishing, some of which are open sourced like fuzzup.

Read more

The detailed documentation and motivation for fuzzup including code references and extended workflow examples can be accessed here.

Contact

We hope, that you will find fuzzup useful.

Please direct any questions and feedbacks to us!

If you want to contribute (which we encourage you to), open a PR.

If you encounter a bug or want to suggest an enhancement, please open an issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuzzup-0.2.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

fuzzup-0.2.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file fuzzup-0.2.1.tar.gz.

File metadata

  • Download URL: fuzzup-0.2.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for fuzzup-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bd5d6c62a168867d451c55e21c1061ca74904170cc4e3d50f2a952e32a0375ba
MD5 21e27215e2af17f339e7ebd21b4ef9c6
BLAKE2b-256 78efbdc62dfeeaa5294c20d43b6915e0f1d5bf4cd363c84c58dc98c5cc803ba5

See more details on using hashes here.

File details

Details for the file fuzzup-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fuzzup-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for fuzzup-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d506102f4aef321834d61b5b71fee4464c7351985e2480eb2de6c7b2e4fe1aaa
MD5 30d85c77d2d07c62f41221e27f78dafa
BLAKE2b-256 08b744c1f7e96e47d9294d03fabb32d6fb816095ff2e55130bf299edba8d2fe5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page