scel

package
v0.0.0-...-9799186 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OffsetPinyin  = 0x1540
	OffsetChinese = 0x2628
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dict

type Dict struct {
	Info        Info
	PinyinIndex []string
	Words       []Word // Words is sorted by Word.PinyinIndex
}

func LoadBytes

func LoadBytes(b []byte, o *LoadOptions) (*Dict, error)

func LoadFile

func LoadFile(fn string, o *LoadOptions) (*Dict, error)

func (*Dict) Search

func (d *Dict) Search(pys ...string) (*Word, error)

type Info

type Info struct {
	Name        string
	Type        string
	Description string
	Example     string
}

type LoadOptions

type LoadOptions struct {
	SkipExt           bool
	ResolveWordPinyin bool
}

type Word

type Word struct {
	PinyinIndex []int
	Pinyin      []string
	Words       []string
	Exts        [][]byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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