TrieTree

package
v0.0.0-...-7f82f8f Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Count    int
	Children map[rune]*Node
}

func NewTrieTree

func NewTrieTree() *Node

func (*Node) Add

func (this *Node) Add(str string, count, incr int) int

func (*Node) FuzzySearch

func (this *Node) FuzzySearch(fuzzy string, topCount int) SearchResult

func (*Node) PrefixSearch

func (this *Node) PrefixSearch(prefix string, topCount int) SearchResult

func (*Node) SubstrSearch

func (this *Node) SubstrSearch(sub string, topCount int) SearchResult

type SearchResult

type SearchResult []*WordCount

func (SearchResult) Len

func (this SearchResult) Len() int

func (SearchResult) Less

func (this SearchResult) Less(i, j int) bool

func (SearchResult) Sort

func (this SearchResult) Sort()

func (SearchResult) Swap

func (this SearchResult) Swap(i, j int)

type WordCount

type WordCount struct {
	Word  string
	Count int
}

Jump to

Keyboard shortcuts

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