teni

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxWordLength = 15
	MaxStateStack = 2
)
View Source
const (
	FindResultNotMatch = iota
	FindResultMatchPrefix
	FindResultRevert
	FindResultMatchFull

	Consonant = "qwrtpsdfghjklzxcvbnmđQWRTPSDFGHJKLZXCVBNMĐ"
)

Variables

This section is empty.

Functions

func InChangeCharMap added in v1.2.0

func InChangeCharMap(c rune) bool

func InChangeCharMapEx added in v1.5.0

func InChangeCharMapEx(c rune) bool

func InitWordTrie

func InitWordTrie(forceSpell bool, dataFiles ...string) error

func RemoveConsonant added in v1.5.1

func RemoveConsonant(s string) string

func SplitConsonantVowel added in v1.5.1

func SplitConsonantVowel(rs []rune) ([]rune, []rune)

func SwitchCaplock added in v1.2.0

func SwitchCaplock(keyVal uint32) uint32

Types

type BT

type BT struct {
	T rune //Tone char
	B rune //Base char
}

type CR

type CR struct {
	C rune //change to C
}

type Engine

type Engine struct {
	EngineState

	InputMethod InputMethod
	ForceSpell  bool
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine() *Engine

func (*Engine) AddKey

func (pc *Engine) AddKey(key rune)

func (*Engine) AddStr

func (pc *Engine) AddStr(s string)

func (*Engine) Backspace

func (pc *Engine) Backspace()

func (*Engine) GetCommitResult added in v1.4.0

func (pc *Engine) GetCommitResult() []rune

func (*Engine) GetCommitResultStr

func (pc *Engine) GetCommitResultStr() string

func (*Engine) GetRaw added in v1.4.0

func (pc *Engine) GetRaw() []rune

func (*Engine) GetRawStr

func (pc *Engine) GetRawStr() string

func (*Engine) GetResult

func (pc *Engine) GetResult() []rune

func (*Engine) GetResultStr

func (pc *Engine) GetResultStr() string

func (*Engine) HasToneChar

func (pc *Engine) HasToneChar() bool

func (*Engine) LenStateBack added in v1.4.0

func (pc *Engine) LenStateBack() int

func (*Engine) PopStateBack added in v1.4.0

func (pc *Engine) PopStateBack() int

func (*Engine) PushStateBack added in v1.4.0

func (pc *Engine) PushStateBack() int

func (*Engine) RawKeyLen

func (pc *Engine) RawKeyLen() int

func (*Engine) Reset

func (pc *Engine) Reset()

func (*Engine) ResultLen

func (pc *Engine) ResultLen() uint32

type EngineState added in v1.4.0

type EngineState struct {
	// contains filtered or unexported fields
}

type InputMethod added in v1.2.0

type InputMethod int
const (
	IMTeni    InputMethod = iota << 0
	IMVni     InputMethod = iota
	IMTelex   InputMethod = iota
	IMTelexEx InputMethod = iota
)

type SR

type SR struct {
	S string //change to S
}

type W

type W struct {
	F bool        //Full word
	N map[rune]*W // Next characters
}

Word trie

Jump to

Keyboard shortcuts

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