Solve #2
parent
0a3603135e
commit
0e29d6c3c1
|
@ -41,7 +41,7 @@ graphemeiterator
|
||||||
## (ii) SubString(x::GraphemeIterator, i, j) works
|
## (ii) SubString(x::GraphemeIterator, i, j) works
|
||||||
## (ii) I can define functions with AbstractString signature in this package (but I could also just define a union type)
|
## (ii) I can define functions with AbstractString signature in this package (but I could also just define a union type)
|
||||||
## Argument for non inheritance:
|
## Argument for non inheritance:
|
||||||
## (i) AbstractString gives char as individual. Important for print_escaped & search.
|
## (i) All existing types <: AbstractString gives char as individual, which is important for print_escaped & search.
|
||||||
## (ii) How to make split return GraphemeIterator rather than strings? How to join multiple GraphemeIterator w/o rewriting join?
|
## (ii) How to make split return GraphemeIterator rather than strings? How to join multiple GraphemeIterator w/o rewriting join?
|
||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
@ -148,8 +148,8 @@ function compare(dist::TokenMax, s1::AbstractString, s2::AbstractString,
|
||||||
ptsor = compare(TokenSort(dist.dist), s1, s2, len1, len2)
|
ptsor = compare(TokenSort(dist.dist), s1, s2, len1, len2)
|
||||||
ptser = compare(TokenSet(dist.dist), s1, s2, len1, len2)
|
ptser = compare(TokenSet(dist.dist), s1, s2, len1, len2)
|
||||||
return max(base,
|
return max(base,
|
||||||
tsor * unbase_scale,
|
ptsor * unbase_scale,
|
||||||
tser * unbase_scale)
|
ptser * unbase_scale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue