engine

package
v0.0.0-...-b85414d Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

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

type HMM

type HMM struct {
	ADDONE     bool
	GOODTURING bool
	// contains filtered or unexported fields
}

func NewHMM

func NewHMM(p HMMParser) *HMM

func (*HMM) FViterbi

func (this *HMM) FViterbi(words []string)

type HMMParser

type HMMParser struct {
	TagCounts        map[string]int64
	WordCounts       map[string]map[string]int64
	TagBigramCounts  map[string]map[string]int64
	TagForWordCounts map[string]map[string]int64

	MostFreqTag        string
	MostFreqTagCount   int64
	NumTrainingBigrams int64
	// contains filtered or unexported fields
}

func NewHMMParser

func NewHMMParser(filename string) HMMParser

func (*HMMParser) FParseTrainer

func (this *HMMParser) FParseTrainer()

func (*HMMParser) FWordSequence

func (this *HMMParser) FWordSequence() *list.List

func (*HMMParser) Load

func (this *HMMParser) Load()

func (*HMMParser) Save

func (this *HMMParser) Save()

type Node

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

func NewFullNode

func NewFullNode(word string, tag string, parent *Node, prob float64) *Node

func NewSimpleNode

func NewSimpleNode(word string, tag string) *Node

type Scanner

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

func NewScanner

func NewScanner(r io.Reader) *Scanner

func NewScannerString

func NewScannerString(s string) *Scanner

func (*Scanner) HasNext

func (this *Scanner) HasNext() bool

Checks if the input stream still has a sequence of non-whitespace characters to be read using Next.

func (*Scanner) HasNextInt

func (this *Scanner) HasNextInt() bool

Checks if the input stream still has an int to be read using NextInt.

func (*Scanner) HasNextInt64

func (this *Scanner) HasNextInt64() bool

Checks if the input stream still has an int64 to be read using NextInt64.

func (*Scanner) HasNextLine

func (this *Scanner) HasNextLine() bool

Checks if the input stream still has a line to read using NextLine.

func (*Scanner) HasNextUint

func (this *Scanner) HasNextUint() bool

Checks if the input stream still has a uint to be read using NextUint.

func (*Scanner) HasNextUint64

func (this *Scanner) HasNextUint64() bool

Checks if the input stream still has a uint64 to be read using NextUint64.

func (*Scanner) Next

func (this *Scanner) Next() string

func (*Scanner) NextInt

func (this *Scanner) NextInt() int

func (*Scanner) NextInt64

func (this *Scanner) NextInt64() int64

func (*Scanner) NextLine

func (this *Scanner) NextLine() string

func (*Scanner) NextUint

func (this *Scanner) NextUint() uint

func (*Scanner) NextUint64

func (this *Scanner) NextUint64() uint64

type Stack

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

func (*Stack) Len

func (s *Stack) Len() int

Return the stack's length

func (*Stack) Pop

func (s *Stack) Pop() (value interface{})

Remove the top element from the stack and return it's value If the stack is empty, return nil

func (*Stack) Push

func (s *Stack) Push(value interface{})

Push a new element onto the stack

Jump to

Keyboard shortcuts

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