Documentation ¶
Overview ¶
Package myanmartools Code generated by go-bindata. (@generated) DO NOT EDIT. sources: resources/compatibility.tsv resources/zawgyiUnicodeModel.dat
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type BinaryMarkov
- type ZawgyiDetector
- type ZawgyiUnicodeMarkovModel
Constants ¶
const ( //BinaryTag Magic number used to identify //this object in byte slice BinaryTag = 0x424D41524B4F5620 //BinaryVersion current serial format //version number, used in assiciation with magic number BinaryVersion = 0 )
const ( //ModelBinaryTag Magic number used to identify this object in byte streams. (Reads in ASCII as "UZMODEL") ModelBinaryTag = 0x555A4D4F44454C20 //StdCp0 Standard Myanmar code point range before digits StdCp0 int = '\u1000' //StdCp1 Standard Myanmar code point range before digits StdCp1 int = '\u103F' //AftCp0 standard myanmar code point range after digits AftCp0 int = '\u104A' //AftCp1 standard myanmar code point range after digits AftCp1 int = '\u109F' //ExaCp0 extended myanmar code point range A ExaCp0 int = '\uAA60' //ExaCp1 extended myanmar code point range A ExaCp1 int = '\uAA7F' //ExbCp0 extended Myanmar code point range B ExbCp0 int = '\uA9E0' //ExbCp1 extended Myanmar code point range B ExbCp1 int = '\uA9FF' //SpcCp0 unicode space character SpcCp0 int = '\u2000' //SpcCp1 unicode space character SpcCp1 int = '\u200B' //StdOffset index into Markov Nodes StdOffset int = 1 //AftOffset index into Markov Nodes AftOffset int = StdOffset + StdCp1 - StdCp0 + 1 //ExaOffset index into Markov Nodes ExaOffset int = AftOffset + AftCp1 - AftCp0 + 1 //ExbOffset index into Markov Nodes ExbOffset int = ExaOffset + ExaCp1 - ExaCp0 + 1 //SpcOffset index into Markov Nodes SpcOffset int = ExbOffset + ExbCp1 - ExbCp0 + 1 //EndOffset index into Markov Nodes EndOffset int = SpcOffset + SpcCp1 - SpcCp0 + 1 //SsvStdExaExbSpc include Myanmar, Extended A, Extended B and space-like SsvStdExaExbSpc int = 0 //SsvStdExaExb same as above but no space-like code points SsvStdExaExb int = 1 //SsvCount ssv count SsvCount int = 2 )
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type BinaryMarkov ¶
BinaryMarkov interface
func NewBinaryMarkov ¶
func NewBinaryMarkov(datReader *bufio.Reader) BinaryMarkov
NewBinaryMarkov return new instance of BinaryMarkov implementation
type ZawgyiDetector ¶
type ZawgyiDetector struct {
// contains filtered or unexported fields
}
ZawgyiDetector struct
func NewZawgyiDetector ¶
func NewZawgyiDetector() *ZawgyiDetector
NewZawgyiDetector return *NewZawgyiDetector
func (*ZawgyiDetector) GetZawgyiProbability ¶
func (zd *ZawgyiDetector) GetZawgyiProbability(input string) float64
GetZawgyiProbability method
type ZawgyiUnicodeMarkovModel ¶
type ZawgyiUnicodeMarkovModel interface { GetIndexForCodePoint(cp int, ssv int) int GetSize(ssv int) int Predict(input string) float64 }
ZawgyiUnicodeMarkovModel interface
func NewZawgyiUnicodeMarkovModel ¶
func NewZawgyiUnicodeMarkovModel(classifier BinaryMarkov, ssv int) ZawgyiUnicodeMarkovModel
NewZawgyiUnicodeMarkovModel creates and returns ZawgyiUnicodeMarkovModel implementation for classifier and ssv
func NewZawgyiUnicodeMarkovModelFromReader ¶
func NewZawgyiUnicodeMarkovModelFromReader(datReader *bufio.Reader) ZawgyiUnicodeMarkovModel
NewZawgyiUnicodeMarkovModelFromReader creates and returns ZawgyiUnicodeMarkovModel from specified dat file