semhash 0.3.2__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- semhash-0.3.3/CITATION.cff +27 -0
- {semhash-0.3.2 → semhash-0.3.3}/PKG-INFO +8 -5
- {semhash-0.3.2 → semhash-0.3.3}/README.md +7 -4
- {semhash-0.3.2 → semhash-0.3.3}/semhash/datamodels.py +10 -1
- {semhash-0.3.2 → semhash-0.3.3}/semhash/version.py +1 -1
- {semhash-0.3.2 → semhash-0.3.3}/semhash.egg-info/PKG-INFO +8 -5
- {semhash-0.3.2 → semhash-0.3.3}/semhash.egg-info/SOURCES.txt +1 -0
- {semhash-0.3.2 → semhash-0.3.3}/.github/workflows/ci.yaml +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/.gitignore +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/.pre-commit-config.yaml +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/LICENSE +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/Makefile +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/assets/images/semhash_logo.png +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/assets/images/semhash_logo_v2.png +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/benchmarks/__init__.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/benchmarks/data.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/benchmarks/results/train_benchmark_results.json +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/benchmarks/results/train_test_benchmark_results.json +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/benchmarks/run_benchmarks.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/pyproject.toml +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash/__init__.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash/index.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash/records.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash/semhash.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash/utils.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash.egg-info/dependency_links.txt +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash.egg-info/requires.txt +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/semhash.egg-info/top_level.txt +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/setup.cfg +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/conftest.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/data/test_model/README.md +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/data/test_model/config.json +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/data/test_model/model.safetensors +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/data/test_model/modules.json +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/data/test_model/tokenizer.json +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/test_datamodels.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/tests/test_semhash.py +0 -0
- {semhash-0.3.2 → semhash-0.3.3}/uv.lock +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use SemHash in your research, please cite it as below."
|
|
3
|
+
title: "SemHash: Fast Semantic Text Deduplication & Filtering"
|
|
4
|
+
authors:
|
|
5
|
+
- family-names: "van Dongen"
|
|
6
|
+
given-names: "Thomas"
|
|
7
|
+
- family-names: "Tulkens"
|
|
8
|
+
given-names: "Stephan"
|
|
9
|
+
doi: 10.5281/zenodo.17265942
|
|
10
|
+
license: MIT
|
|
11
|
+
url: "https://github.com/MinishLab/semhash"
|
|
12
|
+
repository-code: "https://github.com/MinishLab/semhash"
|
|
13
|
+
date-released: "2025-01-05"
|
|
14
|
+
|
|
15
|
+
preferred-citation:
|
|
16
|
+
type: software
|
|
17
|
+
title: "SemHash: Fast Semantic Text Deduplication & Filtering"
|
|
18
|
+
authors:
|
|
19
|
+
- family-names: "van Dongen"
|
|
20
|
+
given-names: "Thomas"
|
|
21
|
+
- family-names: "Tulkens"
|
|
22
|
+
given-names: "Stephan"
|
|
23
|
+
year: 2025
|
|
24
|
+
publisher: Zenodo
|
|
25
|
+
doi: 10.5281/zenodo.17265942
|
|
26
|
+
url: "https://github.com/MinishLab/semhash"
|
|
27
|
+
license: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: semhash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Fast Semantic Text Deduplication & Filtering
|
|
5
5
|
Author-email: Thomas van Dongen <thomas123@live.nl>, Stéphan Tulkens <stephantul@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -513,9 +513,12 @@ MIT
|
|
|
513
513
|
If you use SemHash in your research, please cite the following:
|
|
514
514
|
```bibtex
|
|
515
515
|
@software{minishlab2025semhash,
|
|
516
|
-
author
|
|
517
|
-
title
|
|
518
|
-
year
|
|
519
|
-
|
|
516
|
+
author = {{van Dongen}, Thomas and Stephan Tulkens},
|
|
517
|
+
title = {SemHash: Fast Semantic Text Deduplication \& Filtering},
|
|
518
|
+
year = {2025},
|
|
519
|
+
publisher = {Zenodo},
|
|
520
|
+
doi = {10.5281/zenodo.17265942},
|
|
521
|
+
url = {https://github.com/MinishLab/semhash},
|
|
522
|
+
license = {MIT}
|
|
520
523
|
}
|
|
521
524
|
```
|
|
@@ -457,9 +457,12 @@ MIT
|
|
|
457
457
|
If you use SemHash in your research, please cite the following:
|
|
458
458
|
```bibtex
|
|
459
459
|
@software{minishlab2025semhash,
|
|
460
|
-
author
|
|
461
|
-
title
|
|
462
|
-
year
|
|
463
|
-
|
|
460
|
+
author = {{van Dongen}, Thomas and Stephan Tulkens},
|
|
461
|
+
title = {SemHash: Fast Semantic Text Deduplication \& Filtering},
|
|
462
|
+
year = {2025},
|
|
463
|
+
publisher = {Zenodo},
|
|
464
|
+
doi = {10.5281/zenodo.17265942},
|
|
465
|
+
url = {https://github.com/MinishLab/semhash},
|
|
466
|
+
license = {MIT}
|
|
464
467
|
}
|
|
465
468
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import json
|
|
3
4
|
import warnings
|
|
4
5
|
from collections import defaultdict
|
|
5
6
|
from dataclasses import dataclass, field
|
|
@@ -156,7 +157,15 @@ class DeduplicationResult(Generic[Record]):
|
|
|
156
157
|
# Get the list of duplicates for the selected record
|
|
157
158
|
raw_list = buckets.get(_to_hashable(selected), [])
|
|
158
159
|
# Ensure we don't have duplicates in the list
|
|
159
|
-
|
|
160
|
+
# Use full-record canonical JSON for dicts so that unhashable values are handled correctly
|
|
161
|
+
deduped = {
|
|
162
|
+
(
|
|
163
|
+
json.dumps(rec, sort_keys=True, separators=(",", ":"), ensure_ascii=False)
|
|
164
|
+
if isinstance(rec, dict)
|
|
165
|
+
else rec
|
|
166
|
+
): (rec, score)
|
|
167
|
+
for rec, score in raw_list
|
|
168
|
+
}
|
|
160
169
|
result.append(SelectedWithDuplicates(record=selected, duplicates=list(deduped.values())))
|
|
161
170
|
|
|
162
171
|
return result
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version_triple__ = (0, 3,
|
|
1
|
+
__version_triple__ = (0, 3, 3)
|
|
2
2
|
__version__ = ".".join(map(str, __version_triple__))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: semhash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Fast Semantic Text Deduplication & Filtering
|
|
5
5
|
Author-email: Thomas van Dongen <thomas123@live.nl>, Stéphan Tulkens <stephantul@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -513,9 +513,12 @@ MIT
|
|
|
513
513
|
If you use SemHash in your research, please cite the following:
|
|
514
514
|
```bibtex
|
|
515
515
|
@software{minishlab2025semhash,
|
|
516
|
-
author
|
|
517
|
-
title
|
|
518
|
-
year
|
|
519
|
-
|
|
516
|
+
author = {{van Dongen}, Thomas and Stephan Tulkens},
|
|
517
|
+
title = {SemHash: Fast Semantic Text Deduplication \& Filtering},
|
|
518
|
+
year = {2025},
|
|
519
|
+
publisher = {Zenodo},
|
|
520
|
+
doi = {10.5281/zenodo.17265942},
|
|
521
|
+
url = {https://github.com/MinishLab/semhash},
|
|
522
|
+
license = {MIT}
|
|
520
523
|
}
|
|
521
524
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|