From 1e4f28d468a53a3599090c839f316c5046ccb0ad Mon Sep 17 00:00:00 2001 From: matthieugomez Date: Thu, 22 Oct 2015 12:54:12 -0400 Subject: [PATCH] alignment --- src/StringDistances.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/StringDistances.jl b/src/StringDistances.jl index 4f8cdf7..1e08911 100644 --- a/src/StringDistances.jl +++ b/src/StringDistances.jl @@ -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