Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
func NewJiebaTokenizer ¶
func NewJiebaTokenizer() *Tokenizer
func NewTokenizer ¶
func (*Tokenizer) AddWord ¶
Add a word to the prefix dictionary. If word already exists, the word's frequency value will be updated. If freq is less than 1, a frequency will be automatically calculated.
func (*Tokenizer) CutParallel ¶
Perform Cut in worker goroutines in parallel. If ordered is true, the returned slice will be sorted according to the order of the input text. Sorting will adversely impact performance by approximately 30%.
Click to show internal directories.
Click to hide internal directories.