similarity

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BM25Scorer

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

func NewBM25Scorer

func NewBM25Scorer(boost, k1, b, avgDocLen float64, idf *search.Explanation) *BM25Scorer

func (*BM25Scorer) Explain

func (b *BM25Scorer) Explain(freq int, norm float64) *search.Explanation

func (*BM25Scorer) Score

func (b *BM25Scorer) Score(freq int, norm float64) float64

type BM25Similarity

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

func NewBM25Similarity

func NewBM25Similarity() *BM25Similarity

func NewBM25SimilarityBK1

func NewBM25SimilarityBK1(b, k1 float64) *BM25Similarity

func (*BM25Similarity) AverageFieldLength

func (b *BM25Similarity) AverageFieldLength(stats segment.CollectionStats) float64

func (*BM25Similarity) ComputeNorm

func (b *BM25Similarity) ComputeNorm(numTerms int) float32

func (*BM25Similarity) Idf

func (b *BM25Similarity) Idf(docFreq, docCount uint64) float64

func (*BM25Similarity) IdfExplainTerm

func (b *BM25Similarity) IdfExplainTerm(collectionStats segment.CollectionStats, termStats segment.TermStats) *search.Explanation

func (*BM25Similarity) Scorer

func (b *BM25Similarity) Scorer(boost float64, collectionStats segment.CollectionStats, termStats segment.TermStats) search.Scorer

type CompositeSumScorer

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

func NewCompositeSumScorer

func NewCompositeSumScorer() *CompositeSumScorer

func NewCompositeSumScorerWithBoost added in v0.1.8

func NewCompositeSumScorerWithBoost(boost float64) *CompositeSumScorer

func (*CompositeSumScorer) ExplainComposite

func (c *CompositeSumScorer) ExplainComposite(constituents []*search.DocumentMatch) *search.Explanation

func (*CompositeSumScorer) ScoreComposite

func (c *CompositeSumScorer) ScoreComposite(constituents []*search.DocumentMatch) float64

type ConstantScorer

type ConstantScorer float64

func (ConstantScorer) Explain

func (c ConstantScorer) Explain(_ int, _ float64) *search.Explanation

func (ConstantScorer) ExplainComposite

func (c ConstantScorer) ExplainComposite(_ []*search.DocumentMatch) *search.Explanation

func (ConstantScorer) Score

func (c ConstantScorer) Score(_ int, _ float64) float64

func (ConstantScorer) ScoreComposite

func (c ConstantScorer) ScoreComposite(_ []*search.DocumentMatch) float64

Jump to

Keyboard shortcuts

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