Versions in this module Expand all Collapse all v3 v3.0.1 May 16, 2022 Changes in this version + 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 NewIterTokenizer(opts ...TokenizerOptFunc) *iterTokenizer + func RestoreAsset(dir, name string) error + func RestoreAssets(dir, name string) error + type DataSource func(model *Model) + func UsingEntities(data []EntityContext) DataSource + func UsingEntitiesAndTokenizer(data []EntityContext, tokenizer Tokenizer) DataSource + type DocOpt func(doc *Document, opts *DocOpts) + func UsingModel(model *Model) DocOpt + func UsingTokenizer(include Tokenizer) DocOpt + func WithExtraction(include bool) DocOpt + func WithSegmentation(include bool) DocOpt + func WithTagging(include bool) DocOpt + func WithTokenization(include bool) DocOpt + type DocOpts struct + Extract bool + Segment bool + Tag bool + Tokenizer Tokenizer + type Document struct + Model *Model + Text string + func NewDocument(text string, opts ...DocOpt) (*Document, error) + func (doc *Document) Entities() []Entity + func (doc *Document) Sentences() []Sentence + func (doc *Document) Tokens() []Token + type Entity struct + Label string + Text string + type EntityContext struct + Accept bool + Spans []LabeledEntity + Text string + type LabeledEntity struct + End int + Label string + Start int + type Model struct + Name string + func DefaultModel(tagging, classifying bool) *Model + func ModelFromData(name string, sources ...DataSource) *Model + func ModelFromDisk(path string) *Model + func ModelFromFS(name string, filesys fs.FS) *Model + func (m *Model) Write(path string) error + type Sentence struct + Text string + type Token struct + Label string + Tag string + Text string + type TokenTester func(string) bool + type Tokenizer interface + Tokenize func(string) []*Token + type TokenizerOptFunc func(*iterTokenizer) + func UsingContractions(x []string) TokenizerOptFunc + func UsingEmoticons(x map[string]int) TokenizerOptFunc + func UsingIsUnsplittable(x TokenTester) TokenizerOptFunc + func UsingPrefixes(x []string) TokenizerOptFunc + func UsingSanitizer(x *strings.Replacer) TokenizerOptFunc + func UsingSpecialRE(x *regexp.Regexp) TokenizerOptFunc + func UsingSplitCases(x []string) TokenizerOptFunc + func UsingSuffixes(x []string) TokenizerOptFunc + type TupleSlice [][][]string + func ReadTagged(text, sep string) TupleSlice + func (t TupleSlice) Len() int + func (t TupleSlice) Swap(i, j int) Other modules containing this package github.com/mesgai/prose