Skip to main content

A Python package for deduplicating data.

Project description

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

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

deduplicate_lib-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deduplicate_lib-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file deduplicate_lib-0.1.0.tar.gz.

File metadata

  • Download URL: deduplicate_lib-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for deduplicate_lib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 566723e5a7506768325cce12ebd6c52e9c092dd7fcee27ce8567c8a0eeda8d20
MD5 abbf146170605df476646ef598374c3c
BLAKE2b-256 56e824c31d5e1db133c5b6f21d9071b4c99e26681000bc4ef9ce9623b0aabb0b

See more details on using hashes here.

File details

Details for the file deduplicate_lib-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deduplicate_lib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 463d24546764e8e0d72b7b97c5eed3c08463fc33a90c66458a518e0de6488cda
MD5 4a3528c8995be2778749b13bf335e03c
BLAKE2b-256 9c0790ff2eb98d98897633f0843bd2a14894ac6cefb3c57722930483acc7d5aa

See more details on using hashes here.

Supported by

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