def get_best_match(self, input, corpus, tolerance):
cartesian = itr.product(input, corpus)
max_match = 0
max_p = ""
max_q = ""
for p, q in cartesian:
match_percentage = fuzz.ratio(p, q)
if(match_percentage > max_match):
max_match = match_percentage
max_p = p
max_q = q
return max_p, max_q
BiographyAnalyzer.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录