linear

package
v0.0.0-...-36cd861 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LearnProgress

type LearnProgress struct {
	VectorSystemsCount int
	Step               int
	BestScore          int
	RelaxingCount      int
}

type Learner

type Learner struct {
	*scorer.Vectoriser
	// contains filtered or unexported fields
}

func (*Learner) Learn

func (learner *Learner) Learn(learningData []*spell.LearningTerm) spell.ScoreModel

func (*Learner) LearnProgress

func (learner *Learner) LearnProgress() string

type Scorer

type Scorer struct {
	Weights *scorer.Vector
	*scorer.Vectoriser
}

func (*Scorer) Compare

func (scoring *Scorer) Compare(a *spell.Suggestion, b *spell.Suggestion) float64

func (*Scorer) GetVectorSystem

func (scoring *Scorer) GetVectorSystem(a *spell.LearningTerm) *VectorSystem

func (*Scorer) Score

func (scoring *Scorer) Score(a *spell.Suggestion) float64

type VectorSystem

type VectorSystem struct {
	Vectors []*scorer.Vector
}

func InitVectorSystem

func InitVectorSystem() *VectorSystem

func (*VectorSystem) Add

func (system *VectorSystem) Add(inequality *scorer.Vector)

func (*VectorSystem) Dump

func (system *VectorSystem) Dump()

func (*VectorSystem) IsSatisfied

func (system *VectorSystem) IsSatisfied(vector *scorer.Vector) bool

func (*VectorSystem) Normalize

func (system *VectorSystem) Normalize()

Jump to

Keyboard shortcuts

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