sat

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 7

README

高性能的简繁体转换

基本使用方式

dicter := DefaultDict()
dicter.Read("什麼")
dicter.ReadReverse("什么")

支持自定义加载词库

DefaultDict(SetPath("/users/go/src/xxx.txt"))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDefaultDict added in v1.0.1

func InitDefaultDict(opts ...Option) error

Types

type Dicter

type Dicter interface {
	Init(opts ...Option) error
	Read(string) string
	ReadReverse(string) string
}

func DefaultDict

func DefaultDict() Dicter

type Option

type Option func(*Options)

func SetPath

func SetPath(path string) Option

type Options

type Options struct {
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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