ahocorasick

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

README

ahocorasick

A Golang implementation of the Aho-Corasick string matching algorithm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher is returned by NewMatcher and contains a list of blices to match against

func NewMatcher

func NewMatcher(dictionary map[string]string) *Matcher

NewMatcher creates a new Matcher used to match against a set of blices

func (*Matcher) Match

func (m *Matcher) Match(in []byte) []map[string]int

func (*Matcher) Replace

func (m *Matcher) Replace(in []byte) []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL