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 []gse.SegPos)
- func (seg *Segmenter) LoadDict(fileName ...string) error
- func (seg *Segmenter) Trim(se []gse.SegPos) (re []gse.SegPos)
- func (seg *Segmenter) TrimPunct(se []gse.SegPos) (re []gse.SegPos)
- func (seg *Segmenter) TrimWithPos(se []gse.SegPos, pos ...string) (re []gse.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.
func (*Segmenter) TrimWithPos ¶
TrimWithPos trim some pos
Click to show internal directories.
Click to hide internal directories.