public class TfIdfScoringFunction extends Object implements ScoringFunction
Constructor and Description |
---|
TfIdfScoringFunction() |
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 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