github.com/grahambrooks/fingerprint
Readme
= Fingerprint
A fingerprinting and similarity module for go.
This is an implementation of algorithm described in the http://igm.univ-mlv.fr/~mac/ENS/DOC/sigmod03-1.pdf[Winnowing: Local Algorithms for Document Fingerprinting] and can be used to fingerprint document text and calculate a similarity score using the https://en.wikipedia.org/wiki/Jaccard_index[Jaccard index or similarity coefficient]
The library works for relatively small documents and not designed for use with streams or channels.
package main
import ( "fmt" "github.com/grahambrooks/fingerprint/fingerprinter" "github.com/grahambrooks/fingerprint/similarity" )
func main() { score := similarity.StringSimilarity("the quick brown fox jumped over the lazy dog", "the quick brown fox jumped over the lazy dog", fingerprinter.Options{})
fmt.Printf("Similary score %f", score)
Produces:
go run main.go Similary score 1.000000
The similarity score is between 0 (dissimilar) to 1 similar depending on the fingerrpint options.
FAQs
Unknown package
We found that github.com/grahambrooks/fingerprint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.