Documentation ¶
Overview ¶
Package pos model data The data from https://github.com/fxsjy/jieba
Index ¶
- type Dict
- type SegPos
- type Segmenter
- func (seg *Segmenter) Cut(sentence string, hmm bool) (result []SegPos)
- func (seg *Segmenter) LoadDict(fileName ...string) error
- func (seg *Segmenter) Trim(se []SegPos) (re []SegPos)
- func (seg *Segmenter) TrimPos(se []SegPos, pos ...string) (re []SegPos)
- func (seg *Segmenter) WithGse(segs gse.Segmenter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
type Dict struct {
// contains filtered or unexported fields
}
Dict represents a dictionary used for word segmentation.
type Segmenter ¶
type Segmenter struct {
// contains filtered or unexported fields
}
Segmenter is a words segmentation struct.
func (*Segmenter) Cut ¶
Cut cuts a sentence into words. Parameter hmm controls whether to use the HMM.
Click to show internal directories.
Click to hide internal directories.