Skip to main content

deduplicate_lib

deduplication algorithms in python


GitHub codecov PyPI version Python 3.9+ License: MIT CI Code style: ruff

Key Features

  • Easy to use deduplication algorithms for any vector array
  • Suite of tolerance tuning algorithms to help you find the right tolerance value for your system
  • Suite of benchmarking tools to ensure rigor, accuracy, and speed (not yet implemented)
  • Factory Plugin architecture, for easy extensibility and modification

Implemented Algorithms

  • Distance Matrix (Simple, accurate, expensive): Computes the distance matrix for all vectors and determines duplicates by finding those that fall below a given distance
  • Multi Hashing (Fast): Smears and rounds the vectors using a normal distribution and computes the hashes for each which are then used to determine duplicates by proportion of hash clashes.

Quick Start

install using pip

pip install deduplicate_lib

load your data into python

from deduplicate_lib.plugins.deduplication_algorithms.multi_hash import MultiHash

# define your paramerters in the MultiHash object
dda=MultiHash(dataset_array=your_data_numpy_array)

# return a list of all unique values
print(dda.deduplicate())

A more detailed example can be seen in the examples directory

Dependencies

  • Python 3.9+
  • numpy
  • numba
  • scipy

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/julianholland/deduplicate.git
cd deduplicate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
ruff check .
ruff format .

Running Tests

# Run all tests
pytest

# Run specific test categories
pytest tests/core/
pytest tests/plugins/
pytest tests/plugins/duplicate_detection_algorithms/distance_matrix

# Run with coverage
pytest --cov

📝 Citation

If you use deduplicate_lib in your research, please cite:

@software{deduplicate2026,
  title={deduplicate_lib: Auto Tolerance Finding Deduplication Algorithms in Python},
  author={Julian Holland},
  year={2026},
  url={https://github.com/julianholland/deduplicate},
  version={0.0.5}
}

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • The Fritz Haber Institute
  • Juan Manuel Lombardi <3
  • Maximillion Ach
  • Chiara Panosetti

Project Links

Project To-Do

  • Add example.ipynb
  • Create general Pre-allocation protocal
  • Add benchmarks for time and robustness
  • Add Locality-Sensitive Hashing as an option
  • Speedup slow tasks with Numba
  • Set up Read the Docs
  • Create general deduplicate function
  • Speed up NTPP

Metadata

Release files for deduplicate_lib 0.0.5

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

Source distribution (sdist)

Source distribution for deduplicate_lib 0.0.5
File Size Uploaded
deduplicate_lib-0.0.5.tar.gz 15.0 kB Details

Built distribution (wheel)

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

Total release size: 32.3 kB

Release files / deduplicate_lib-0.0.5.tar.gz

Download URL deduplicate_lib-0.0.5.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
de3b2ddbfa85d2ee30c7babd76ab7848f047aa1ab124e828ac5eec9264cb3072
BLAKE2b-256 checksum
How to use checksums
7117c5c48e4a54ab1e54b94a9a5674045ed091dce8562e52bbf1cef977f75e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / deduplicate_lib-0.0.5-py3-none-any.whl

Download URL deduplicate_lib-0.0.5-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75a091ab726d2528f17fa70cae7b3874b25ce665c28fa2867e3fa3c4dcb51a9e
BLAKE2b-256 checksum
How to use checksums
1c836311d45b9fbbd05f107a0d6d5ccbe2a7a9370ed1df2b1ed81accd9112339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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