Skip to content

we-miks/ac_automaton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ac automaton

This package implements ac automaton algorithm for fast matching many patterns in string.

example

A simple use case:

package main

import (
"fmt"
"github.com/we-miks/ac_automaton"
)

func main() {
    patterns := []string{"i", "is", "his", "her", "hers", "she"}
    ac := ac_automaton.NewACAutomaton()
    for _, pattern := range patterns {
        ac.Insert(pattern)
    }
    ac.Build()
    s := "uthersheis"
    res := ac.FindMatches(s)
    fmt.Println(res)
}

About

golang ac automation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages