nlp

package
v0.0.0-...-ddf2a0b Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Dict string `toml:"dict"`
	Stop string `toml:"stop"`
}

type Segmenter

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

func (*Segmenter) AddStop

func (s *Segmenter) AddStop(text string)

func (*Segmenter) AddToken

func (s *Segmenter) AddToken(text string, freq float64, pos ...string)

func (*Segmenter) Cut

func (s *Segmenter) Cut(str string, hmm ...bool) []string

func (*Segmenter) CutAll

func (s *Segmenter) CutAll(str string) []string

func (*Segmenter) CutHtml

func (s *Segmenter) CutHtml(str string) string

func (*Segmenter) CutSearch

func (s *Segmenter) CutSearch(str string, hmm ...bool) []string

func (*Segmenter) CutSearchStr

func (s *Segmenter) CutSearchStr(str string) string

func (*Segmenter) CutSearchTrimStr

func (s *Segmenter) CutSearchTrimStr(str string) string

func (*Segmenter) CutStr

func (s *Segmenter) CutStr(str []string) string

func (*Segmenter) CutTrim

func (s *Segmenter) CutTrim(str string) []string

func (*Segmenter) CutTrimStr

func (s *Segmenter) CutTrimStr(str string) string

func (*Segmenter) CutUrl

func (s *Segmenter) CutUrl(str string, num ...bool) string

func (*Segmenter) Cuts

func (s *Segmenter) Cuts(str string) string

func (*Segmenter) Dict

func (s *Segmenter) Dict() *gse.Dictionary

func (*Segmenter) InitCong

func (s *Segmenter) InitCong(conf Conf)

func (*Segmenter) InitLoad

func (s *Segmenter) InitLoad() (err error)

func (*Segmenter) IsStop

func (s *Segmenter) IsStop(text string) bool

func (*Segmenter) Load

func (s *Segmenter) Load(files ...string) error

func (*Segmenter) LoadStop

func (s *Segmenter) LoadStop(files ...string) error

func (*Segmenter) Pos

func (s *Segmenter) Pos(str string, hmm ...bool) (pos []gse.SegPos)

func (*Segmenter) RemoveToken

func (s *Segmenter) RemoveToken(text string)

func (*Segmenter) Trim

func (s *Segmenter) Trim(str []string) []string

func (*Segmenter) WithGse

func (s *Segmenter) WithGse()

Jump to

Keyboard shortcuts

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