|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.index.IdxIntern | +--gov.nist.nlpir.irf.index.IdfIdxIntern
This class extends IdxIntern to support indexes based around the Inverse Document Frequency (IDF) term weighting measure. Note: The Math.log() function returns the natural log ("ln" or log to the base e) of its argument (see java.lang.Math.log()). We have used it here for the sake of performance, though traditionally IR applications use log base 2.
Field Summary | |
private static int |
numCalcDocumentScoreThreads
Number of threads to be started for calculation of document scores |
private static int |
numCalcFeatureScoreThreads
Number of threads to be started for calculation of feature scores |
Fields inherited from class gov.nist.nlpir.irf.index.IdxIntern |
flagUpToDate,
indexingFeatures,
serialVersionUID |
Constructor Summary | |
IdfIdxIntern(java.lang.String loc,
java.lang.String name)
Basic constructor with the Index location and name. |
Method Summary | |
void |
calcCombinedScore(ResultForDocMatchingQueryCondition aResult)
Compensates for differences in the scores of retrieved features, e.g. |
void |
calcDocumentScore(IoAddrIntern anIO_Addr)
Computes the document score and sets it in the passed IoAddrIntern. |
void |
calcFeatureScore(DeIntern aDEI)
Calculates the score of the given feature/DeIntern and sets it in the DeIntern (key to the sources-by-value table). |
void |
calcInputForRSV(ResultForDocMatchingQueryCondition aResult)
Positions fields of aResult to allow the computation of Retrieval Status Value (RSV). |
double |
calcRSV(ResultForDocMatchingQueryModalityUnit aResult)
Calculates the Retrieval Status Value (RSV) of a single modality unit of the result of a query. |
void |
calcWeightOfFeatureInDocument(ResultForDocMatchingQueryCondition aResult)
Computes the weight of the given feature for the documents it appears in and sets it in the result. |
void |
calcWeightOfFeatureInQuery(ResultForDocMatchingQueryCondition aResult)
Calculates the weight of the feature in the query and sets it in the result. |
java.lang.String |
toString()
Returns a string representation of this index |
void |
update()
Updates the index after it has been created. |
void |
updateFeatures()
Computes the scores of the stored features in one or more separate threads. |
void |
updateSources()
Computes the scores of the stored documents in one or more separate threads. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final int numCalcFeatureScoreThreads
private static final int numCalcDocumentScoreThreads
Constructor Detail |
public IdfIdxIntern(java.lang.String loc, java.lang.String name)
loc
- index location infoname
- index nameMethod Detail |
public java.lang.String toString()
no Features
public void update()
public void updateFeatures()
public void updateSources()
public void calcFeatureScore(DeIntern aDEI)
aDEI
- the DeIntern whose score is to be computed.public void calcDocumentScore(IoAddrIntern anIO_Addr)
an_IOAddr
- the IoAddrIntern of the document whose score
is to be calculatedpublic void calcInputForRSV(ResultForDocMatchingQueryCondition aResult)
aResult
- the Result... used.public void calcCombinedScore(ResultForDocMatchingQueryCondition aResult)
aResult
- partial result on which to calculate the combined scorepublic void calcWeightOfFeatureInDocument(ResultForDocMatchingQueryCondition aResult)
aResult
- partial result for which to compute the weight...public void calcWeightOfFeatureInQuery(ResultForDocMatchingQueryCondition aResult)
aResult
- partial result on which to calculate the weight...public double calcRSV(ResultForDocMatchingQueryModalityUnit aResult)
aResult
- partial result for which to calculate the RSV
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |