Skip to content

ivanfoong/strikeamatch-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Strike A Match

A fuzzy string matching algorithm in Go, as described at http://www.catalysoft.com/articles/strikeamatch.html

Installation

$ go get github.com/ivanfoong/strikeamatch-go

Unit Test

$ cd $GOPATH/src/github.com/ivanfoong/strikeamatch-go/strikeamatch
$ go test

Usage

package main

import (
  "fmt"
  "github.com/ivanfoong/strikeamatch-go/strikeamatch"
)

func main() {
  text1 := "Web Database Applications with PHP & MySQL"
  text2 := "Web Database Applications"
  fmt.Printf("`%s` compared to `%s` has a score of %.2f\n", text1, text2, strikeamatch.CompareString(text1, text2))
  // prints `Web Database Applications with PHP & MySQL` compared to `Web Database Applications` has a score of 0.82
}

License

MIT License

Changelog

  • 1.0.0 - Added CompareString method

About

A fuzzy string matching algorithm in Go, as described at http://www.catalysoft.com/articles/strikeamatch.html

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages