Skip to content

benfdking/textdistance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textdistance

Go Report Card

textdistance is a string comparison library written in Go. Heavily inspired by the identically named Python library, it aims to provide a myriad of different algorithms.

Additionally, it aims to be:

  • safe for production use, preferring error where required over absolute raw performance
  • have consistent interfaces in order to test different implementations to enable easy dependency injection
  • within those constraints being as performant as possible: allowing assembly snippets but no C library links

Documentation

The full documentation with further examples is available at GoDoc.

Usage

Install

go get -u github.com/benfdking/textdistance

Example

package main 

import (
    "fmt"

    "github.com/benfdking/textdistance"
)

func main(){
	h := textdistance.NewHamming()
	distance, _ := h.Distance("drummer", "dresser")
	fmt.Println(distance)
}

About

String comparison library written in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •