dawg

package
v0.0.0-...-b16415c Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dawg

type Dawg struct {
	Version float32
	Root    *Node
}

func (*Dawg) Contains

func (d *Dawg) Contains(word string) bool

func (*Dawg) MatchsPrefix

func (d *Dawg) MatchsPrefix(prefix string) map[string]int32

type Decoder

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

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (d *Decoder) Decode() (*Dawg, error)

type Encoder

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

func NewEncoder

func NewEncoder(dawg *Dawg) *Encoder

func (*Encoder) Encode

func (e *Encoder) Encode(w io.Writer) error

type Node

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

func (*Node) Depth

func (n *Node) Depth() int

func (*Node) EOW

func (n *Node) EOW() bool

func (*Node) Freq

func (n *Node) Freq() int

func (*Node) HasChilds

func (n *Node) HasChilds() bool

func (*Node) Next

func (n *Node) Next(char rune) *Node

Jump to

Keyboard shortcuts

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