bm25

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultK1 = 1.2
	DefaultB  = 0.75
)

Variables

This section is empty.

Functions

func BM25Run

func BM25Run(docs []types.Document, query string, k1, b float64, cleanStopwords []string) ([]float64, error)

func BuildCorpus

func BuildCorpus(docs []types.Document, cleanStopwords []string) []string

func CleanStopwords

func CleanStopwords(content string, languages []string) string

func Score

func Score(corpus []string, query string, k1, b float64) ([]float64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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