#include <CosSimRetMethod.hpp>
Inheritance diagram for CosSimRetMethod:
Public Methods | |
CosSimRetMethod (const Index &dbIndex, ScoreAccumulator &accumulator) | |
Precomputes the idf values for the collection. | |
CosSimRetMethod (const Index &dbIndex, const string &L2file, ScoreAccumulator &accumulator) | |
virtual | ~CosSimRetMethod () |
virtual TextQueryRep * | computeTextQueryRep (const TermQuery &qry) |
compute the query representation for a text query (caller responsible for deleting the memory of the generated new instance) | |
virtual TextQueryRep * | computeTextQueryRep (DOCID_T docid) |
compute a query rep for an existing doc | |
virtual DocumentRep * | computeDocRep (DOCID_T docID) |
compute the doc representation (caller responsible for deleting the memory of the generated new instance) | |
virtual ScoreFunction * | scoreFunc () |
return the scoring function pointer | |
virtual void | updateTextQuery (TextQueryRep &qryRep, const DocIDSet &relDocs) |
Use same as TFIDFRetMethod. | |
void | setFeedbackParam (CosSimParameter::FeedbackParam &feedbackParam) |
Protected Methods | |
double | docNorm (DOCID_T docID) |
compute the L2 norm for a given docID. | |
void | loadDocNorms () |
load the precomputed L2 norms support file. | |
Protected Attributes | |
double * | idfV |
ScoreFunction * | scFunc |
double * | docNorms |
int | numDocs |
int | numTerms |
Parameters | |
CosSimParameter::FeedbackParam | fbParam |
const string & | L2FileName |
Name of support file containing the precomputed L2 norms. |
|
Precomputes the idf values for the collection.
|
|
Precomputes the idf values for the collection. Loads the precomputed L2 document norms from L2File (if present). This support file is optional, if it is not found, L2 norms will be computed during scoring and cached across queries. |
|
|
|
compute the doc representation (caller responsible for deleting the memory of the generated new instance)
Implements TextQueryRetMethod. |
|
compute a query rep for an existing doc
Reimplemented from TextQueryRetMethod. |
|
compute the query representation for a text query (caller responsible for deleting the memory of the generated new instance)
Implements TextQueryRetMethod. |
|
compute the L2 norm for a given docID.
|
|
load the precomputed L2 norms support file.
|
|
return the scoring function pointer
Implements TextQueryRetMethod. |
|
|
|
Use same as TFIDFRetMethod.
Implements TextQueryRetMethod. |
|
|
|
|
|
|
|
Name of support file containing the precomputed L2 norms.
|
|
|
|
|
|
|