seg

package
v0.0.0-...-8ebcefe Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	State uint
	Err   error

	Verbose = false
	Test    = false
)
View Source
var (
	// Stopwords : collection of stopwords
	Stopwords string
)

Functions

func CloseDB

func CloseDB()

func InfoOut

func InfoOut(a ...interface{}) (n int, err error)

func InitDB

func InitDB(strEngine string, strConnect string, doPrepare bool)

func IsIgnore

func IsIgnore(stringForTest string) bool

IsIgnore : check if mixed Chinese stopword

func ProcessWord

func ProcessWord(w string)

func StringJoin

func StringJoin(strs ...string) string

Types

type StructGuessword

type StructGuessword struct {
	Word string
	Freq uint
}

word: 詞庫的詞 freq: 詞的出現頻率 用來暫放找到的詞與詞頻 好像用maps比較好

type StructSegments

type StructSegments struct {
	Current      string //scanned word
	SegSentence  string //A\tBC\tD\tEF
	Score        float64
	Wordcnt      uint
	Guessedwords map[string]float64
}

func Segepoch

func Segepoch(a string) StructSegments

Jump to

Keyboard shortcuts

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