8000 GitHub - xuewenchen/ahocorasick: Aho-Corasick string matching algorithm for golang
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

xuewenchen/ahocorasick

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

##ahocorasick

Aho-Corasick string matching algorithm for golang

package main

import (
	"fmt"
	"github.com/gansidui/ahocorasick"
)

func main() {
	ac := ahocorasick.NewMatcher()

	dictionary := []string{"hello", "world", "世界", "google", "golang", "c++", "love"}

	ac.Build(dictionary)

	ret := ac.Match("hello世界, hello google, i love golang!!!")

	for _, i := range ret {
		fmt.Println(dictionary[i])
	}
}

##LICENSE

MIT

About

Aho-Corasick string matching algorithm for golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0