Documentation
¶
Index ¶
- Variables
- func BestMatch(comp string, selection []string, metric strutil.StringMetric) (distance float64, index int, err error)
- func BestMatchNested(comp string, selections [][]string, metric strutil.StringMetric) (distance float64, outerIndex, innerIndex int, err error)
- func ExtractEpisode(searchTerm string) (string, bool)
- func VideoFilePaths(vfs []string) []string
- type ComposedStringMetric
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSelectionEmpty = common.Error("selection is empty") MetricLevenshtein = metrics.NewLevenshtein() MetricHamming = metrics.NewHamming() MetricJaccard = metrics.NewJaccard() MetricJaro = metrics.NewJaro() MetricJaroWinkler = metrics.NewJaroWinkler() MetricSorensenDice = metrics.NewSorensenDice() Metrics = ComposedStringMetric{ MetricLevenshtein, MetricHamming, MetricJaccard, MetricJaro, MetricJaroWinkler, MetricSorensenDice, } MetricNames = []string{ "Levenshtein", "Hamming", "Jaccard", "Jaro", "JaroWinkler", "SorensenDice", } )
View Source
var (
VideoFileExtensionsMap = map[string]bool{}
)
Functions ¶
func BestMatchNested ¶
func ExtractEpisode ¶
ExtractEpisode tries to extract a numeric value. Returns the string match and whether something was found
func VideoFilePaths ¶
Types ¶
type ComposedStringMetric ¶
type ComposedStringMetric []strutil.StringMetric
func (ComposedStringMetric) Compare ¶
func (cm ComposedStringMetric) Compare(a, b string) float64
Click to show internal directories.
Click to hide internal directories.