blob: 239c0c3893a7749a2c858ce5508ebefe868b01f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate
the differences between sequences in a simple-to-use package.
Simple Ratio
>>> fuzz.ratio("this is a test", "this is a test!")
97
Partial Ratio
>>> fuzz.partial_ratio("this is a test", "this is a test!")
100
Token Sort Ratio
>>> fuzz.ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear")
91
>>> fuzz.token_sort_ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear")
100
WWW: https://pypi.org/project/naiveBayesClassifier/
|