ac

package module
v0.0.0-...-7f06b0b Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 3 Imported by: 0

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 
    

Documentation

Index

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()

Jump to

Keyboard shortcuts

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