#include <CosSimRetMethod.hpp>
Inheritance diagram for lemur::retrieval::CosSimRetMethod:
Public Member Functions | |
CosSimRetMethod (const lemur::api::Index &dbIndex, lemur::api::ScoreAccumulator &accumulator) | |
Precomputes the idf values for the collection. | |
CosSimRetMethod (const lemur::api::Index &dbIndex, const string &L2file, lemur::api::ScoreAccumulator &accumulator) | |
virtual | ~CosSimRetMethod () |
virtual lemur::api::TextQueryRep * | computeTextQueryRep (const lemur::api::TermQuery &qry) |
virtual lemur::api::TextQueryRep * | computeTextQueryRep (lemur::api::DOCID_T docid) |
compute a query rep for an existing doc | |
virtual lemur::api::DocumentRep * | computeDocRep (lemur::api::DOCID_T docID) |
compute the doc representation (caller responsible for deleting the memory of the generated new instance) | |
virtual lemur::api::ScoreFunction * | scoreFunc () |
return the scoring function pointer | |
virtual void | updateTextQuery (lemur::api::TextQueryRep &qryRep, const lemur::api::DocIDSet &relDocs) |
Use same as TFIDFRetMethod. | |
void | setFeedbackParam (CosSimParameter::FeedbackParam &feedbackParam) |
Protected Member Functions | |
double | docNorm (lemur::api::DOCID_T docID) |
compute the L2 norm for a given docID. | |
void | loadDocNorms () |
load the precomputed L2 norms support file. | |
Protected Attributes | |
double * | idfV |
lemur::api::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 lemur::api::TextQueryRetMethod. |
|
compute a query rep for an existing doc
Reimplemented from lemur::api::TextQueryRetMethod. |
|
|
|
compute the L2 norm for a given docID.
|
|
load the precomputed L2 norms support file.
|
|
return the scoring function pointer
Implements lemur::api::TextQueryRetMethod. |
|
|
|
Use same as TFIDFRetMethod.
|
|
|
|
|
|
|
|
Name of support file containing the precomputed L2 norms.
|
|
|
|
|
|
|