Versions in this module Expand all Collapse all v1 v1.0.1 Jul 23, 2021 v1.0.0 Jul 21, 2021 Changes in this version + var DefaultEnds = []string + var DefaultStarts = []string + type AveragedPerceptron struct + func NewAveragedPerceptron() *AveragedPerceptron + func NewAveragedPerceptronFromJSON(aModel model.PerceptronJSONModel) *AveragedPerceptron + func NewAveragedPerceptronFromReader(r io.Reader) (*AveragedPerceptron, error) + func (p *AveragedPerceptron) AddClass(clas string) + func (p *AveragedPerceptron) AverageWeights() + func (p *AveragedPerceptron) Len() int + func (p *AveragedPerceptron) Predict(features []model.Feature) model.Class + func (p *AveragedPerceptron) Update(truth string, guess string, features []model.Feature) + func (p AveragedPerceptron) Model() model.PerceptronJSONModel + type Perceptron struct + func New() *Perceptron + func NewFromModelFile(loc string) (*Perceptron, error) + func NewFromReader(r io.Reader) (*Perceptron, error) + func (p *Perceptron) Load(loc string) error + func (p *Perceptron) Predict(words []string) []model.Class + func (p *Perceptron) Save(loc string) error + func (p *Perceptron) Train(sentences []model.Sentence, iters int, shuf bool, showProgressBar bool) float64