|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.search.visitor.AbstractDocumentIteratorVisitor
it.unimi.di.mg4j.search.score.BM25FScorer.Visitor
protected static final class BM25FScorer.Visitor
| Field Summary | |
|---|---|
protected boolean |
expectedIDF
Whether we are running Boldi's variant. |
protected double[] |
idfPart
Precomputed IDF part. |
protected double[] |
index2B
For each index, the associated parameter b. |
protected double[] |
index2BDividedByAvgDocumentSize
Cached value. |
protected int |
numberOfIndices
The length of TermCollectionVisitor.indices() cached. |
protected int |
numberOfOffsetsSeen
The number of valid entries in seenOffsetsList. |
protected int |
numberOfTermsSeen
The number of terms (irrespective of the index) seen up to now and accumulated in seenTermIdsList. |
protected int[] |
offset2Index
An array indexed by offsets mapping each offset to the corresponding index number. |
protected int[] |
offset2TermId
For each offset, the corresponding term id in the query. |
protected boolean[] |
seen
Whether we have already seen a specific term/index pair. |
protected int[] |
seenOffsetsList
An array accumulating the indices in seen that have been set to true, so to accelerate reset(int). |
protected int[] |
seenTermIdsList
The list of numberOfTermsSeen term ids that we have seen so far. |
protected IntList[] |
sizes
For each index, its list of document sizes. |
protected double[] |
sizeWeightComponent
Cached from BM25Scorer. |
protected int[] |
termId2VirtualCounter
For each term id, its virtual-counter index (to be used to access virtualCount and virtualIdfCount). |
protected double[] |
virtualCount
An array indexed by term ids used by BM25FScorer.score() to compute virtual counts. |
protected double[] |
virtualIdfCount
For expected IDF runs, an array indexed by term ids used by BM25FScorer.score() to compute virtual counts combined with IDF scoring. |
protected double[] |
weight
For each index, its weight. |
| Constructor Summary | |
|---|---|
BM25FScorer.Visitor(boolean expectedIDF,
double[] idfPart,
int[] offset2TermId,
int[] offset2Index,
double[] weight,
double[] index2B,
IntList[] sizes,
double[] index2BDividedByAvgDocumentSize)
|
|
| Method Summary | |
|---|---|
void |
reset(int document)
|
Boolean |
visit(IndexIterator indexIterator)
Visits an IndexIterator leaf. |
| Methods inherited from class it.unimi.di.mg4j.search.visitor.AbstractDocumentIteratorVisitor |
|---|
newArray, prepare, visit, visit, visit, visitPost, visitPre |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final double[] sizeWeightComponent
BM25Scorer.
protected final int numberOfIndices
TermCollectionVisitor.indices() cached.
protected final int[] seenOffsetsList
seen that have been set to true, so to accelerate reset(int).
protected int numberOfOffsetsSeen
seenOffsetsList.
protected final boolean[] seen
protected int numberOfTermsSeen
seenTermIdsList.
protected final int[] seenTermIdsList
numberOfTermsSeen term ids that we have seen so far.
protected final int[] termId2VirtualCounter
virtualCount and virtualIdfCount).
protected final IntList[] sizes
protected final double[] weight
protected final double[] index2B
protected final boolean expectedIDF
protected final int[] offset2TermId
protected final int[] offset2Index
protected final double[] virtualCount
BM25FScorer.score() to compute virtual counts.
protected final double[] virtualIdfCount
BM25FScorer.score() to compute virtual counts combined with IDF scoring.
protected final double[] index2BDividedByAvgDocumentSize
protected final double[] idfPart
| Constructor Detail |
|---|
public BM25FScorer.Visitor(boolean expectedIDF,
double[] idfPart,
int[] offset2TermId,
int[] offset2Index,
double[] weight,
double[] index2B,
IntList[] sizes,
double[] index2BDividedByAvgDocumentSize)
| Method Detail |
|---|
public Boolean visit(IndexIterator indexIterator)
throws IOException
DocumentIteratorVisitorIndexIterator leaf.
indexIterator - the leaf to be visited.
null.
IOExceptionpublic void reset(int document)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||