📜  python代码示例中的模糊查找

📅  最后修改于: 2022-03-11 14:45:09.685000             🧑  作者: Mango

代码示例1
from fuzzywuzzy import process
str2Match = "apple inc"
strOptions = ["Apple Inc.","apple park","apple incorporated","iphone"]
Ratios = process.extract(str2Match,strOptions)
print(Ratios)
# You can also select the string with the highest matching percentage
highest = process.extractOne(str2Match,strOptions)
print(highest)