瀏覽代碼

ffpb_findnode(): change fuzzy matching cutoff from 80% to 75%

Helge Jung 9 年之前
父節點
當前提交
05cd0501b6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/ffpb.py

+ 1 - 1
modules/ffpb.py

@@ -232,7 +232,7 @@ def ffpb_findnode(name):
 			}
 
 	# do a similar name lookup in the ALFRED data
-	possibilities = difflib.get_close_matches(name, [ x for x in names ], cutoff=0.8)
+	possibilities = difflib.get_close_matches(name, [ x for x in names ], cutoff=0.75)
 	print('findnode: Fuzzy matching \'{0}\' got {1} entries: {2}'.format(name, len(possibilities), ', '.join(possibilities)))
 	if len(possibilities) == 1:
 		# if we got exactly one candidate that might be it