Documentation ¶
Index ¶
- Variables
- func AddDict(text, py string)
- func CutWord(s string) []string
- func Initial(p string, segs ...gse.Segmenter) (s string)
- func Join(a []string) (s string)
- func LoadGseDict(files ...string) error
- func LoadGseDictEmbed(dict ...string) error
- func Match(word string) string
- func Paragraph(p string, segs ...gse.Segmenter) (s string)
- func Pinyin(p string, segs ...gse.Segmenter) []string
- func Remove(text string)
- func WithGse(segs gse.Segmenter)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Cut set the pinyin phrase cut Cut = true )
View Source
var DictAdd = map[string]string{
"宿舍": "sù shè",
"不薄": "bù báo",
"打折": "dǎ zhé",
"着手": "zhuó shǒu",
"着眼": "zhuó yǎn",
"着重": "zhuó zhòng",
}
DictAdd phrase dict addition map
Functions ¶
func AddDict ¶ added in v0.30.2
func AddDict(text, py string)
AddDict add a token into phrase dictionary.
func LoadGseDictEmbed ¶ added in v0.42.0
LoadGseDictEmbed load the embed dictionary
func Paragraph ¶
Paragraph convert a Chinese string paragraph to pinyin, including letters, numbers, symbols
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.