Comments (3)
The latest version of StringDistances is 0.10, and the problem does not appear with this version (reopen if not).
from stringdistances.jl.
Something weird going on here, I can manually add Version v0.10.0, but as soon as I do ]Pkg up
, Julia downgrades this package to v0.8.0 again.
Anyway, I created a new Project to check this out and I can still reproduce the problem with versions v0.10.0 of StringDistances:
(Test) pkg> add Distances, StringDistances
Updating registry at `~/.julia/registries/General`
Updating git-repo `git://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/Desktop/Test/Project.toml`
[b4f34e82] + Distances v0.10.0
[88034a9c] + StringDistances v0.10.0
Updating `~/Desktop/Test/Manifest.toml`
[b4f34e82] + Distances v0.10.0
[88034a9c] + StringDistances v0.10.0
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[10745b16] + Statistics
julia> using Distances, StringDistances
julia> pairwise(Jaro(), ["hello" "world"])
ERROR: MethodError: result_type(::Jaro, ::Array{String,2}, ::Array{String,2}) is ambiguous. Candidates:
result_type(dist::PreMetric, a::AbstractArray, b::AbstractArray) in Distances at /home/simon/.julia/packages/Distances/d9gO5/src/generic.jl:36
result_type(dist::Union{Jaro, RatcliffObershelp, JaroWinkler, QGramDistance, DamerauLevenshtein, StringDistances.Hamming, Levenshtein, StringDistances.Normalized, Partial, TokenMax, TokenSet, TokenSort}, s1, s2) in StringDistances at /home/simon/.julia/packages/StringDistances/LqX4j/src/StringDistances.jl:14
Possible fix, define
result_type(::Union{Jaro, RatcliffObershelp, JaroWinkler, QGramDistance, DamerauLevenshtein, StringDistances.Hamming, Levenshtein, StringDistances.Normalized, Partial, TokenMax, TokenSet, TokenSort}, ::AbstractArray, ::AbstractArray)
Stacktrace:
[1] pairwise(::Jaro, ::Array{String,2}; dims::Nothing) at /home/simon/.julia/packages/Distances/d9gO5/src/generic.jl:212
[2] pairwise(::Jaro, ::Array{String,2}) at /home/simon/.julia/packages/Distances/d9gO5/src/generic.jl:209
[3] top-level scope at REPL[4]:1
from stringdistances.jl.
Ok, it does not happen with the dev version of Distances. In any case, I think what you want to do is pairwise(Jaro(), ["hello", "world"])
from stringdistances.jl.
Related Issues (20)
- Phonetic distance HOT 1
- Tag a new version HOT 1
- `Base.findmin(s1, s2, dist::Partial)`
- bug in `DamerauLevenshtein` HOT 9
- `compare` with `Partial` distances gives negative answers HOT 4
- DamerauLevenshtein() vs Levenshtein() why the same distance ? HOT 1
- Speeding up qgram distances with pre-counting of qgrams HOT 9
- (Partial) Hamming distance HOT 5
- TagBot trigger issue HOT 5
- Simpler QGramDistances implementation and prep for general dictionaries and iterators HOT 5
- `Partial` only looks at substrings of the same length... HOT 1
- unexpected behavior when computing distance with an array HOT 2
- Non-strings HOT 4
- The value of "compare" is probably wrong. HOT 1
- Feature Request: Parallel processing HOT 4
- incremental compilation may be fatally broken for this module HOT 5
- Julia v1.7 Jaro() doesn't work HOT 2
- incomplete readme documentation HOT 1
- NaN (or ArgumentError) from QGram distances for short strings HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stringdistances.jl.