Documentation ¶
Overview ¶
Package lattice implements the core of the morph analyzer.
Index ¶
Constants ¶
View Source
const BosEosID int = -1
BosEosID represents Reserved identifier of node id.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lattice ¶
type Lattice struct { Input string Output []*node // contains filtered or unexported fields }
Lattice represents a grid of morph nodes.
func (*Lattice) Backward ¶
func (la *Lattice) Backward(m TokenizeMode)
Backward runs backward algorithm of the Viterbi.
func (*Lattice) Forward ¶
func (la *Lattice) Forward(m TokenizeMode)
Forward runs forward algorithm of the Viterbi.
type TokenizeMode ¶
type TokenizeMode int
TokenizeMode represents how to tokenize sentence.
const ( //Normal Mode Normal TokenizeMode = iota + 1 // Search Mode Search // Extended Mode Extended )
Click to show internal directories.
Click to hide internal directories.