Skip to content

verno3632/go-textdistance

 
 

Repository files navigation

go-textdistance

Calculate various text distancewith golang.

Implemented

How to Use

go install github.com/masatana/go-textdistance
package main

import (
	"fmt"

	"github.com/masatana/go-textdistance"
)

func main() {
	s1 := "this is a test"
	s2 := "that is a test"
	fmt.Println(textdistance.LevenshteinDistance(s1, s2))
	fmt.Println(textdistance.DamerauLevenshteinDistance(s1, s2))
	fmt.Println(textdistance.JaroDistance(s1, s2))
	fmt.Println(textdistance.JaroWinklerDistance(s1, s2))
}

License

This software is released under the MIT License, see LICENSE.txt.

About

Calculate text distance (similarity) in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%