| Constructor and Description |
|---|
UnorderedWindowSequentialDependenceFeature(int window) |
| 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
|
static int[] |
countTerms(int[][] positions,
int window) |
static int[] |
countTerms(int[] document,
int[] query,
int window) |
void |
initialize(ScoringFunction scoringFunction)
Initializes this feature.
|
String |
toString() |
public UnorderedWindowSequentialDependenceFeature(int window)
window - Window sizepublic float computeScoreWithMiniIndexes(int[][] positions,
int[] query,
int dl,
GlobalStats stats)
FeaturecomputeScoreWithMiniIndexes in interface Featurepositions - Positions of each term in the queryquery - Original query termsdl - Document lengthstats - Global statisticspublic float computeScoreWithSlidingWindow(int[] document,
int[] query,
int[] hashedQuery,
GlobalStats stats)
FeaturecomputeScoreWithSlidingWindow in interface Featuredocument - 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 statisticspublic static int[] countTerms(int[][] positions,
int window)
public static int[] countTerms(int[] document,
int[] query,
int window)
public void initialize(ScoringFunction scoringFunction)
Featureinitialize in interface FeaturescoringFunction - scoring function