pull/3/head
matthieugomez 2015-11-05 10:46:48 -05:00
parent aa4c75a340
commit 99d77a585b
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,6 @@
##############################################################################
##
## Partial
## From the Python module fuzzywuzzy
## http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
##
##############################################################################
@ -26,7 +25,7 @@ function compare(dist::Partial, s1::AbstractString, s2::AbstractString, len1::In
end
# Specialization for RatcliffObershelp distance
# Code: https://github.com/seatgeek/fuzzywuzzy/blob/master/fuzzywuzzy/fuzz.py
# Code follows https://github.com/seatgeek/fuzzywuzzy/blob/master/fuzzywuzzy/fuzz.py
function compare(dist::Partial{RatcliffObershelp}, s1::AbstractString, s2::AbstractString, len1::Integer, len2::Integer)
len1 == len2 && return compare(dist.dist, s1, s2, len1, len2)
out = 0.0

View File

@ -1,6 +1,7 @@
##############################################################################
##
## TokenSort
## http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
##
##############################################################################
type TokenSort{T <: PreMetric} <: PreMetric
@ -16,6 +17,7 @@ end
##############################################################################
##
## TokenSet
## http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
##
##############################################################################
type TokenSet{T <: PreMetric} <: PreMetric