agext / levenshtein Goto Github PK
View Code? Open in Web Editor NEWLevenshtein distance and similarity metrics with customizable edit costs and Winkler-like bonus for common prefix.
License: Apache License 2.0
Levenshtein distance and similarity metrics with customizable edit costs and Winkler-like bonus for common prefix.
License: Apache License 2.0
OI have the following in my Gopkg.lock file:
[[projects]]
name = "github.com/agext/levenshtein"
packages = ["."]
revision = "5f10fee965225ac1eecdc234c09daf5cd9e7f7b6"
version = "v1.2.1"
Output from running dep ensure.
Solving failure: no valid source could be created:
failed to set up sources from the following URLs:
https://github.com/agext/levenshtein
: remote repository at https://github.com/agext/levenshtein does not exist, or is inaccessible: remote: Internal Server Error.
remote:
fatal: unable to access 'https://github.com/agext/levenshtein/': The requested URL returned error: 500
: exit status 128
failed to set up sources from the following URLs:
ssh://[email protected]/agext/levenshtein
: remote repository at ssh://[email protected]/agext/levenshtein does not exist, or is inaccessible: ERROR:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
: exit status 128
failed to set up sources from the following URLs:
git://github.com/agext/levenshtein
: remote repository at git://github.com/agext/levenshtein does not exist, or is inaccessible: fatal: remote error:
: exit status 128
failed to set up sources from the following URLs:
http://github.com/agext/levenshtein
: remote repository at http://github.com/agext/levenshtein does not exist, or is inaccessible: remote: Internal Server Error.
remote:
fatal: unable to access 'http://github.com/agext/levenshtein/': The requested URL returned error: 500
: exit status 128
package levenshtein failing as bwlow when it tried to access github.com/mattn/goveralls
https://travis-ci.com/github/asellappen/levenshtein/jobs/398770419
Testing with goveralls...
go: downloading github.com/mattn/goveralls v0.0.7
go: github.com/mattn/goveralls upgrade => v0.0.7
go: downloading golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375
Bad response status from coveralls: 422
{"message":"Couldn't find a repository matching this job.","error":true}
The command "./test.sh $TEST_METHOD" exited with 1.
have tried with adding COVERALLS_TOKEN in travis.yml as below and still its failing ,
travis encrypt COVERALLS_TOKEN=your_token_goes_here --add env.global
env:
global:
secure: 0wWHj9zvAqpjPMxngeVm6+WwjynAAfOwoGy1yBnwiH7rsOskuWbf7aaaOhVC65fH+wiRbmBIpGMlVXv5wrKGrK7EXxMcoXBtie0MoK2UCWRwJcYG3+e4bZ9wLe+3eBRGK/EbT8GawHrJaZxPvhg......................................
Please help to check and provide a fix for this?
Hello,
please excuse if this is not an issue with your code but as a beginner in Golang it seems to me like it could be.
Here is the sample code I run:
package main
import "fmt"
import "github.com/davecgh/go-spew/spew"
import "github.com/agext/levenshtein"
func main () {
var myparams = levenshtein.NewParams()
myparams.MinScore(0.92)
spew.Dump(myparams)
fmt.Println(levenshtein.Match(`foo`, `foo`, myparams))
fmt.Println(levenshtein.Match(`foo`, `bar`, myparams))
fmt.Println(levenshtein.Match(`NetworkManager-glib-0.8.1-5.el6_0.1.i686.rpm`, `gdm-plugin-fingerprint-2.30.4-39.el6.i686.rpm`, myparams))
}
It produces the following output:
(*levenshtein.Params)(0xc000094100)({
insCost: (int) 1,
subCost: (int) 1,
delCost: (int) 1,
maxCost: (int) 0,
minScore: (float64) 0.92,
bonusPrefix: (int) 4,
bonusScale: (float64) 0.1,
bonusThreshold: (float64) 0.7
})
1
0
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/agext/levenshtein.Calculate(0xc0000ca000, 0x24, 0x2c, 0xc0000cc000, 0x23, 0x30, 0x5, 0x1, 0x1, 0x1, ...)
/Users/smeier/go/src/github.com/agext/levenshtein/levenshtein.go:112 +0x8ba
github.com/agext/levenshtein.Match(0x11036f6, 0x2c, 0x11037ff, 0x2d, 0xc000094100, 0x2)
/Users/smeier/go/src/github.com/agext/levenshtein/levenshtein.go:272 +0x1a8
main.main()
/Users/smeier/Documents/grabbag/levenshtein_bug.go:14 +0x271
exit status 2
I am running go version go1.12.5 darwin/amd64.
Any help or comments are appreciated.
In .travis.yml file, need to update the checks for latest go versions, from 1.16.x till 1.19.x
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.