rust-scorer 0.3.6__cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

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.
@@ -0,0 +1,5 @@
1
+ from .rust_scorer import *
2
+
3
+ __doc__ = rust_scorer.__doc__
4
+ if hasattr(rust_scorer, "__all__"):
5
+ __all__ = rust_scorer.__all__
@@ -0,0 +1,65 @@
1
+ """Type stubs for rust_scorer - high-performance fuzzy matching for BibItems."""
2
+
3
+ from typing import TypedDict
4
+
5
+ class BibItemData(TypedDict):
6
+ """Input data for a single BibItem."""
7
+
8
+ index: int
9
+ title: str
10
+ author: str
11
+ year: int | None
12
+ doi: str | None
13
+ journal: str | None
14
+ volume: str | None
15
+ number: str | None
16
+ pages: str | None
17
+ publisher: str | None
18
+
19
+ class MatchResult(TypedDict):
20
+ """Result of scoring a candidate against a subject."""
21
+
22
+ candidate_index: int
23
+ total_score: float
24
+ title_score: float
25
+ author_score: float
26
+ date_score: float
27
+ bonus_score: float
28
+
29
+ class SubjectMatchResult(TypedDict):
30
+ """Result for a single subject with its top matches."""
31
+
32
+ subject_index: int
33
+ matches: list[MatchResult]
34
+ candidates_searched: int
35
+
36
+ def token_sort_ratio(s1: str, s2: str) -> float:
37
+ """Token sort ratio using Jaro-Winkler similarity.
38
+
39
+ Args:
40
+ s1: First string to compare
41
+ s2: Second string to compare
42
+
43
+ Returns:
44
+ Similarity score from 0.0 to 100.0
45
+ """
46
+ ...
47
+
48
+ def score_batch(
49
+ subjects: list[BibItemData],
50
+ candidates: list[BibItemData],
51
+ top_n: int,
52
+ min_score: float,
53
+ ) -> list[SubjectMatchResult]:
54
+ """Batch score multiple subjects against candidates in parallel.
55
+
56
+ Args:
57
+ subjects: List of BibItems to find matches for
58
+ candidates: List of BibItems to match against
59
+ top_n: Maximum number of matches to return per subject
60
+ min_score: Minimum score threshold for matches
61
+
62
+ Returns:
63
+ List of results, one per subject, containing top matches
64
+ """
65
+ ...
rust_scorer/py.typed ADDED
File without changes
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: rust_scorer
3
+ Version: 0.3.6
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Python: >=3.8
@@ -0,0 +1,7 @@
1
+ rust_scorer/__init__.py,sha256=NEi2bG_00jHJH8W6ZQAQuktPcHv9Sha7bZ4pAY3pqJ0,127
2
+ rust_scorer/__init__.pyi,sha256=CDT-4bpH9pOlEkxaqbVOzrZTiTIFzy5dsn8rqRT23Rs,1623
3
+ rust_scorer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ rust_scorer/rust_scorer.cpython-313t-aarch64-linux-gnu.so,sha256=KaXL0iqEOnLnD5q2liQyh5ugAsmixcdUFBc4VLc1nlI,787480
5
+ rust_scorer-0.3.6.dist-info/METADATA,sha256=lMTDcpYfDbQodyV07m1OVKP3omTHmsB2RI_cuhCbYXw,260
6
+ rust_scorer-0.3.6.dist-info/WHEEL,sha256=q835leI5tUqUNzGLT6_2V4Cxb6Anw8rRDNKWlUcsVqo,151
7
+ rust_scorer-0.3.6.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.11.5)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313t-manylinux_2_17_aarch64
5
+ Tag: cp313-cp313t-manylinux2014_aarch64