scorer

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: GPL-2.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package scorer implements subtitle scoring based on release matching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine is a configured scorer.

func New

func New(scores *api.Scores) *Engine

New creates a scorer engine with the given weights.

func (*Engine) Score

func (e *Engine) Score(sub api.SubtitleInfo, matches api.MatchSet) (score, scoreNoHash int)

Score calculates the score for a subtitle's match set. The input matches struct is not modified.

Verifiable hash match returns the hash weight directly (typically 100). Otherwise, only release attribute keys contribute to the score. Non-verifiable hash adds the hash weight on top of release attributes.

func (*Engine) ScoreToTier

func (e *Engine) ScoreToTier(score int) api.ScoreTier

ScoreToTier returns the named tier for a given score.

Jump to

Keyboard shortcuts

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