Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.28 KB

README.md

File metadata and controls

42 lines (28 loc) · 1.28 KB

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)
}