types

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// LoadDictTypeIDF dict of IDF to loading
	LoadDictTypeIDF = iota + 1

	// LoadDictTypeTFIDF dict of TFIDF to loading
	LoadDictTypeTFIDF

	// LoadDictTypeBM25 dict of BM25 to loading
	LoadDictTypeBM25

	// LoadDictTypeWithPos dict of with position to loading
	LoadDictTypeWithPos

	// LoadDictCorpus dict of corpus to loading
	LoadDictCorpus
)
View Source
const (
	// BM25DefaultK1 default k1 value for calculate bm25
	BM25DefaultK1 = 1.25

	// BM25DefaultK1 default B value for calculate bm25
	BM25DefaultB = 0.75
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BM25Setting

type BM25Setting struct {
	// K1 calculation factors for the formula of bm25
	// this factors generally takes values in the range of 1.2 to 2
	// and we define K1 = 1.25 for defult value in `consts/dict_file.go`
	K1 float64

	// B calculation factors for the formula of bm25
	// this factors generally takes values 0.75
	// and we define B = 0.75 for defult value in `consts/dict_file.go`
	B float64
}

type LoadDictFile

type LoadDictFile struct {
	// file path to load dict
	FilePath string

	// file type to load, defind in file `consts/dict_file.go`
	FileType int
}

Jump to

Keyboard shortcuts

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