deduplicate_lib
deduplication algorithms in python
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(
tolerance=0.01,
dataset_array: your_data_array,
perturbations: int = 200,
)
print(dda.get_dataset_unique_structures())
A more detailed example can be seen in the examples directory
Dependencies
- Python 3.9+
numpynumba
🤝 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{alomancy2025,
title={Deduplicate_lib: Auto Tolerance Finding Deduplication Algorithms in Python},
author={Julian Holland},
year={2026},
url={https://github.com/julianholland/deduplicate},
version={0.0.1dev}
}
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- The Fritz Haber Institute
- Juan Manuel Lombardi <3
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
Metadata
Release files for deduplicate_lib 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deduplicate_lib-0.0.2.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deduplicate_lib-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / deduplicate_lib-0.0.2.tar.gz
| Download URL | deduplicate_lib-0.0.2.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5c61bd544b084b952622beb86cbe2fdaa9293e267c580ae6e0c2f98cf4616c8
|
|
BLAKE2b-256 checksum How to use checksums |
adcfd1347b3b13862f73751e408dd65fdc653d107431738d6320d4e7cf6a06ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / deduplicate_lib-0.0.2-py3-none-any.whl
| Download URL | deduplicate_lib-0.0.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ca26a1cc0393261868ec4a74e3618586c1c696661d7d0d8a39064eb4e830366
|
|
BLAKE2b-256 checksum How to use checksums |
0e2210c9c1e44c2ba83369c58caef02e60cf94c5a10409b34c10f29a1a06334b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|