public class BM25ScoringFunction extends Object implements ScoringFunction
Constructor and Description |
---|
BM25ScoringFunction(float k1,
float b) |
Modifier and Type | Method and Description |
---|---|
float |
computePhraseScore(int dl,
int tf,
GlobalStats stat)
Computes phrase feature value.
|
float |
computeTermScore(int term,
int dl,
int tf,
GlobalStats stat)
Computes term feature value.
|
String |
toString() |
public BM25ScoringFunction(float k1, float b)
k1
- BM25 parameter k1b
- BM25 parameter bpublic float computePhraseScore(int dl, int tf, GlobalStats stat)
ScoringFunction
computePhraseScore
in interface ScoringFunction
dl
- Document lengthtf
- Phrase frequencystat
- Global statisticspublic float computeTermScore(int term, int dl, int tf, GlobalStats stat)
ScoringFunction
computeTermScore
in interface ScoringFunction
dl
- Document lengthtf
- Term frequencystat
- Global statistics