Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 543 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 543 Bytes

Levenshtein Distance

Levenshtein Distance for calculate distance of two string in Golang.

Install

go get github.com/khmerlang/levenshtein

Example

package main

import (
  "fmt"
  "github.com/khmerlang/levenshtein"
)

func main() {
  s1 := "កកោស"
  s2 := "ក"
  fmt.Printf("ចំងាយរវាង %v និង %v គឺ %v\n",
    s1, s2, levenshtein.Distance(s1, s2))
  // -> ចំងាយរវាង កកោស និង ក គឺ 3
}