File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ Scorers in RapidFuzz can be found in the modules `fuzz` and `distance`.
13013084.21052631578947
131131> fuzz.token_set_ratio(" fuzzy was a bear" , " fuzzy fuzzy was a bear" )
132132100.0
133+ # Returns 100.0 if one string is a subset of the other, regardless of extra content in the longer string
134+ > fuzz.token_set_ratio(" fuzzy was a bear but not a dog" , " fuzzy was a bear" )
135+ 100.0
136+ # Score is reduced only when there is explicit disagreement in the two strings
137+ > fuzz.token_set_ratio(" fuzzy was a bear but not a dog" , " fuzzy was a bear but not a cat" )
138+ 92.3076923076923
133139```
134140
135141#### Weighted Ratio
Original file line number Diff line number Diff line change @@ -434,6 +434,12 @@ def token_set_ratio(
434434 83.8709716796875
435435 >>> fuzz.token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear")
436436 100.0
437+ # Returns 100.0 if one string is a subset of the other, regardless of extra content in the longer string
438+ >>> fuzz.token_set_ratio("fuzzy was a bear but not a dog", "fuzzy was a bear")
439+ 100.0
440+ # Score is reduced only when there is explicit disagreement in the two strings
441+ >>> fuzz.token_set_ratio("fuzzy was a bear but not a dog", "fuzzy was a bear but not a cat")
442+ 92.3076923076923
437443 """
438444 setupPandas ()
439445 if is_none (s1 ) or is_none (s2 ):
You can’t perform that action at this time.
0 commit comments