forked from rapidfuzz/RapidFuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess_cpp_impl.pyi
116 lines (110 loc) · 3.12 KB
/
process_cpp_impl.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
from __future__ import annotations
from typing import (
Any,
Callable,
Collection,
Generator,
Hashable,
Iterable,
Mapping,
Sequence,
TypeVar,
Union,
overload,
)
from rapidfuzz.fuzz import WRatio, ratio
_StringType = Sequence[Hashable]
_AnyStringType = TypeVar("_AnyStringType", bound=_StringType)
_S1 = TypeVar("_S1")
_S2 = TypeVar("_S2")
_ResultType = Union[int, float]
@overload
def extractOne(
query: _S1,
choices: Iterable[_S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> tuple[_S2, _ResultType, int]: ...
@overload
def extractOne(
query: _S1,
choices: Mapping[Any, _S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> tuple[_S2, _ResultType, Any]: ...
@overload
def extract(
query: _S1,
choices: Collection[_S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
limit: int | None = 5,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> list[tuple[_S2, _ResultType, int]]: ...
@overload
def extract(
query: _S1,
choices: Mapping[Any, _S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
limit: int | None = 5,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> list[tuple[_S2, _ResultType, Any]]: ...
@overload
def extract_iter(
query: _S1,
choices: Iterable[_S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> Generator[tuple[_S2, _ResultType, int], None, None]: ...
@overload
def extract_iter(
query: _S1,
choices: Mapping[Any, _S2],
*,
scorer: Callable[..., _ResultType] = WRatio,
processor: Callable[..., _StringType] | None = None,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
scorer_kwargs: dict[str, Any] | None = None,
) -> Generator[tuple[_S2, _ResultType, Any], None, None]: ...
FLOAT32: int
FLOAT64: int
INT8: int
INT16: int
INT32: int
INT64: int
UINT8: int
UINT16: int
UINT32: int
UINT64: int
def cdist(
queries: Iterable[_S1],
choices: Iterable[_S2],
*,
scorer: Callable[..., _ResultType] = ratio,
processor: Callable[..., _StringType] | None = None,
score_cutoff: _ResultType | None = None,
score_hint: _ResultType | None = None,
dtype: int | None = None,
workers: int = 1,
scorer_kwargs: dict[str, Any] | None = None,
) -> Any: ...