Added
Link Here
|
1 |
--- extern/rapidfuzz-cpp/rapidfuzz/fuzz.hpp.orig 2023-09-26 11:15:29 UTC |
2 |
+++ extern/rapidfuzz-cpp/rapidfuzz/fuzz.hpp |
3 |
@@ -186,7 +186,7 @@ struct CachedPartialRatio { (private) |
4 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
5 |
|
6 |
private: |
7 |
- std::basic_string<CharT1> s1; |
8 |
+ std::vector<CharT1> s1; |
9 |
rapidfuzz::detail::CharSet<CharT1> s1_char_set; |
10 |
CachedRatio<CharT1> cached_ratio; |
11 |
}; |
12 |
@@ -296,7 +296,7 @@ struct CachedTokenSortRatio { (private) |
13 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
14 |
|
15 |
private: |
16 |
- std::basic_string<CharT1> s1_sorted; |
17 |
+ std::vector<CharT1> s1_sorted; |
18 |
CachedRatio<CharT1> cached_ratio; |
19 |
}; |
20 |
|
21 |
@@ -354,7 +354,7 @@ struct CachedPartialTokenSortRatio { (private) |
22 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
23 |
|
24 |
private: |
25 |
- std::basic_string<CharT1> s1_sorted; |
26 |
+ std::vector<CharT1> s1_sorted; |
27 |
CachedPartialRatio<CharT1> cached_partial_ratio; |
28 |
}; |
29 |
|
30 |
@@ -422,8 +422,8 @@ struct CachedTokenSetRatio { (private) |
31 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
32 |
|
33 |
private: |
34 |
- std::basic_string<CharT1> s1; |
35 |
- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; |
36 |
+ std::vector<CharT1> s1; |
37 |
+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; |
38 |
}; |
39 |
|
40 |
template <typename Sentence1> |
41 |
@@ -479,8 +479,8 @@ struct CachedPartialTokenSetRatio { (private) |
42 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
43 |
|
44 |
private: |
45 |
- std::basic_string<CharT1> s1; |
46 |
- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; |
47 |
+ std::vector<CharT1> s1; |
48 |
+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; |
49 |
}; |
50 |
|
51 |
template <typename Sentence1> |
52 |
@@ -539,9 +539,9 @@ struct CachedTokenRatio { (private) |
53 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
54 |
|
55 |
private: |
56 |
- std::basic_string<CharT1> s1; |
57 |
- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> s1_tokens; |
58 |
- std::basic_string<CharT1> s1_sorted; |
59 |
+ std::vector<CharT1> s1; |
60 |
+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> s1_tokens; |
61 |
+ std::vector<CharT1> s1_sorted; |
62 |
CachedRatio<CharT1> cached_ratio_s1_sorted; |
63 |
}; |
64 |
|
65 |
@@ -601,9 +601,9 @@ struct CachedPartialTokenRatio { (private) |
66 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
67 |
|
68 |
private: |
69 |
- std::basic_string<CharT1> s1; |
70 |
- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; |
71 |
- std::basic_string<CharT1> s1_sorted; |
72 |
+ std::vector<CharT1> s1; |
73 |
+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; |
74 |
+ std::vector<CharT1> s1_sorted; |
75 |
}; |
76 |
|
77 |
template <typename Sentence1> |
78 |
@@ -659,10 +659,10 @@ struct CachedWRatio { (private) |
79 |
private: |
80 |
// todo somehow implement this using other ratios with creating PatternMatchVector |
81 |
// multiple times |
82 |
- std::basic_string<CharT1> s1; |
83 |
+ std::vector<CharT1> s1; |
84 |
CachedPartialRatio<CharT1> cached_partial_ratio; |
85 |
- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; |
86 |
- std::basic_string<CharT1> s1_sorted; |
87 |
+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; |
88 |
+ std::vector<CharT1> s1_sorted; |
89 |
rapidfuzz::detail::BlockPatternMatchVector blockmap_s1_sorted; |
90 |
}; |
91 |
|
92 |
@@ -774,7 +774,7 @@ struct CachedQRatio { (private) |
93 |
double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; |
94 |
|
95 |
private: |
96 |
- std::basic_string<CharT1> s1; |
97 |
+ std::vector<CharT1> s1; |
98 |
CachedRatio<CharT1> cached_ratio; |
99 |
}; |
100 |
|