alignment

pull/1/head
matthieugomez 2015-10-22 12:54:12 -04:00
parent a8984c6904
commit 1e4f28d468
1 changed files with 8 additions and 8 deletions

View File

@ -93,14 +93,14 @@ function evaluate(dist::JaroWinkler, s1::AbstractString, s2::AbstractString)
i2high = min(length(s2), i1 + maxdist)
for i2 in i2low:i2high
if ch == s2[i2] && !flag[i2]
m += 1
# if match is before the index of previous match
if i2 < prevpos
t += 1
end
prevpos = max(i2, prevpos)
flag[i2] = true
break
m += 1
# if match is before the index of previous match
if i2 < prevpos
t += 1
end
prevpos = max(i2, prevpos)
flag[i2] = true
break
end
end
end