README ¶ usage trie := NewTrie() trie.AddKeyword("ac") trie.AddKeyword("de") emits := trie.ParseText("acde") //emits is a list of matched keyword with start and end offset in parse text Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Emit type Trie func NewTrie() *Trie func (t *Trie) AddKeyword(kw string) func (t *Trie) ParseText(text string) []Emit func (t *Trie) Print() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Emit ¶ type Emit struct { S int E int W string } type Trie ¶ type Trie struct { // contains filtered or unexported fields } func NewTrie ¶ func NewTrie() *Trie func (*Trie) AddKeyword ¶ func (t *Trie) AddKeyword(kw string) func (*Trie) ParseText ¶ func (t *Trie) ParseText(text string) []Emit func (*Trie) Print ¶ func (t *Trie) Print() Source Files ¶ View all Source files ac.go Click to show internal directories. Click to hide internal directories.