public interface Feature
Modifier and Type | Method and Description |
---|---|
float |
computeScoreWithMiniIndexes(int[][] positions,
int[] query,
int dl,
GlobalStats stats)
Computes the feature value using a (mini-)indexed document.
|
float |
computeScoreWithSlidingWindow(int[] document,
int[] query,
int[] hashedQuery,
GlobalStats stats)
Computes the feature value using a sliding window
given a document, query and a scoring function
|
void |
initialize(ScoringFunction score)
Initializes this feature.
|
float computeScoreWithMiniIndexes(int[][] positions, int[] query, int dl, GlobalStats stats)
positions
- Positions of each term in the queryquery
- Original query termsdl
- Document lengthstats
- Global statisticsfloat computeScoreWithSlidingWindow(int[] document, int[] query, int[] hashedQuery, GlobalStats stats)
document
- Flat array representation of a document vector.query
- Original query terms (used to retrieve global statistics)hashedQuery
- Hashed query terms (the same as query for techniques that don't use hashing)stats
- Global statisticsvoid initialize(ScoringFunction score)
score
- scoring function