core

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatList = make([]*Format, 0, 20)

Functions

func PinyinToWords added in v1.2.1

func PinyinToWords(di []*pinyin.Entry) []string

func PrintFormatList

func PrintFormatList()

func WubiToWords added in v1.2.1

func WubiToWords(di []*wubi.Entry) []string

Types

type Config

type Config struct {
	IName   string // 文件名
	IData   []byte // 输入,如果为空则读取IName
	IFormat string // 输入格式

	Schema  string // 形码方案
	MbData  []byte // 自定义码表
	AABC    bool   // 三字词规则
	OFormat string // 输出格式
	OName   string // 保存文件名
	// contains filtered or unexported fields
}

func (*Config) Marshal

func (c *Config) Marshal() []byte

func (*Config) Save

func (c *Config) Save(data []byte) error

func (*Config) ToPinyin added in v1.2.1

func (c *Config) ToPinyin(di []string) []byte

转换为拼音词库

func (*Config) ToWubi

func (c *Config) ToWubi(di []string, hasRank bool) []byte

拼音转为五笔词库

形码方案,wubi86/wubi98/wubi08/phrase

type FilterConfig

type FilterConfig struct {
	WordLenMin int // 过滤小于这个长度的词
	WordLenMax int // 过滤大于这个长度的词
	FreqLenMin int // 过滤词频小于这个值的词
	FreqLenMax int // 过滤词频大于这个值的词
	// 根据词过滤
	HasAlphabet bool // 过滤含英文的词
	HasNumber   bool // 过滤含数字的词
}

type Format

type Format struct {
	Name       string `json:"name"`
	ID         string `json:"id"`
	CanMarshal bool   `json:"canMarshal"`
	Kind       int    `json:"kind"`
}

Jump to

Keyboard shortcuts

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