score

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEvaluator

type DefaultEvaluator struct{}

DefaultEvaluator uses string similarity to rate subtitles against media files

func (*DefaultEvaluator) Evaluate

func (e *DefaultEvaluator) Evaluate(f types.Media, s types.Media) float32

Evaluate determines how well the subtitle matches

type Weighted

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

Weighted is a weighted probability

func NewWeighted

func NewWeighted() *Weighted

NewWeighted returns a new weighted probability object

func (*Weighted) AddEquals

func (ws *Weighted) AddEquals(a interface{}, b interface{}, w float64)

AddEquals adds a new metric to the probability based on equality

func (*Weighted) AddScore

func (ws *Weighted) AddScore(p float64, w float64)

AddScore adds a new metric to the weighted probability

func (*Weighted) Score

func (ws *Weighted) Score() float64

Score calculates the score from the added metrics

Jump to

Keyboard shortcuts

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