graphemes

pull/3/head
matthieugomez 2015-11-07 12:01:26 -05:00
parent 16fafd4414
commit bc09975de8
1 changed files with 3 additions and 7 deletions

View File

@ -29,14 +29,14 @@ Winkler,
Partial,
TokenSort,
TokenSet,
TokenMax,
graphemes2
TokenMax
##############################################################################
##
## Extend methods of GraphemeIterator
##
##############################################################################
typealias GraphemeOrString Union{GraphemeIterator, AbstractString}
# retwrite next
function Base.next(g::GraphemeIterator, i)
s = g.s
@ -70,14 +70,11 @@ end
Base.endof(g::GraphemeIterator) = endof(g.s)
Base.SubString(x::GraphemeIterator, i, j) = graphemes(SubString(x.s, i, j))
typealias GraphemeOrString Union{GraphemeIterator, AbstractString}
##############################################################################
##
## include
##
##############################################################################
include("distances/edit.jl")
include("distances/qgram.jl")
include("distances/RatcliffObershelp.jl")
@ -91,7 +88,6 @@ include("modifiers/fuzzywuzzy.jl")
##
##############################################################################
function evaluate(dist::PreMetric, s1::GraphemeOrString, s2::GraphemeOrString)
len1, len2 = length(s1), length(s2)
if len1 > len2