encoder

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

README

编码器

  • 纯词生成拼音
  • 全拼词库或纯词生成双拼定长码表
  • 纯词生成形码编码(指定单字码表和规则)
  • 从简全混和码表中提取单字全码
  • 从全码表生成出简不出全码表(需要规则)

出简不出全规则,逗号,冒号分隔,默认 1,n 无限

1:0,2:3,3:2,6:n -> 无 1 简,2 码 3 重,3 码 2 重,4 码 1 重,5 码 1 重,6 码无限重

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CharYinjieMap = genCharYinjieMap()
View Source
var WordPinyinMap = genWordPinyinMap(word_pinyin)

Functions

func GetPinyin

func GetPinyin(word string) []string

通过词表+单字表生成词的拼音

func GetPyByChar

func GetPyByChar(word string) []string

通过单字表生成词的拼音

func ReadCharCodes added in v0.0.2

func ReadCharCodes(data []byte) CharCodes

读取单字码表

func Shorten added in v0.0.2

func Shorten(wct *WcTable, rule string)

rule 1:0,2:3,3:2,6:n 默认1,n 无限

Types

This section is empty.

Jump to

Keyboard shortcuts

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