increase fuzzy threshhold

This commit is contained in:
Sanj 2012-06-08 14:11:02 +05:30
parent 40c6f4fab3
commit cff4beba26

View File

@ -113,14 +113,14 @@ def fuzzystops(request):
s1 = unr.from_stop.name.lower() s1 = unr.from_stop.name.lower()
s2 = unr.from_stop_txt.lower() s2 = unr.from_stop_txt.lower()
from_ratio = fuzzprocess.ratio(s1,s2) from_ratio = fuzzprocess.ratio(s1,s2)
if from_ratio < 50: if from_ratio < 70:
froms_arr.append( froms_arr.append(
(unr, from_ratio,) (unr, from_ratio,)
) )
s3 = unr.to_stop.name.lower() s3 = unr.to_stop.name.lower()
s4 = unr.to_stop_txt.lower() s4 = unr.to_stop_txt.lower()
to_ratio = fuzzprocess.ratio(s3,s4) to_ratio = fuzzprocess.ratio(s3,s4)
if to_ratio < 50: if to_ratio < 70:
tos_arr.append( tos_arr.append(
(unr, to_ratio,) (unr, to_ratio,)
) )