lex

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	NLANG = "nlang"
	NCELL = "ncell"
)
View Source
const (
	NPAGE = "npage"
	NHASH = "nhash"
)
View Source
const (
	TRAIN = "train"
	PARSE = "parse"
)
View Source
const (
	SPLIT_SPACE = "split.space"
	SPLIT_BLOCK = "split.block"
	SPLIT_QUOTE = "split.quote"
	SPLIT_TRANS = "split.trans"
)
View Source
const LEX = "lex"
View Source
const MATRIX = "matrix"
View Source
const PREFIX = "prefix"
View Source
const REGEXP = "regexp"
View Source
const SPLIT = "split"

Variables

View Source
var Index = &ice.Context{Name: LEX, Help: "词法模块"}

Functions

func Split added in v0.7.8

func Split(m *ice.Message, arg ...string) ice.Map

Types

type Matrix

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

func NewMatrix

func NewMatrix(m *ice.Message, nlang, ncell int) *Matrix

func (*Matrix) Parse

func (mat *Matrix) Parse(m *ice.Message, npage string, stream *Stream) (hash int, word []byte)

func (*Matrix) Train

func (mat *Matrix) Train(m *ice.Message, npage, nhash string, seed string) int

type Point

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

type State

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

type Stream

type Stream struct {
	P int
	// contains filtered or unexported fields
}

func NewStream

func NewStream(r io.Reader) *Stream

func (*Stream) Char

func (s *Stream) Char() byte

func (*Stream) Next

func (s *Stream) Next()

func (*Stream) Scan

func (s *Stream) Scan() bool

Jump to

Keyboard shortcuts

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