Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::retrieval::StructQryDocRep Class Reference

Representation of a document for structured query retrieval method. Provides support for passage level operations on a document. More...

#include <StructQryDocRep.hpp>

Inheritance diagram for lemur::retrieval::StructQryDocRep:

lemur::api::DocumentRep List of all members.

Public Member Functions

 StructQryDocRep (lemur::api::DOCID_T docID, double *idfValue, int docLength, int docCount, double docLengthAverage, double db)
 New StructQryDocRep.

virtual ~StructQryDocRep ()
 no clean up

virtual double termWeight (lemur::api::TERMID_T termID, const lemur::api::DocInfo *info) const
 needed for DocRep interface.

virtual double termWeight (lemur::api::TERMID_T termID, double dtf, int df) const
 Belief score for this term with this dtf.

virtual double scoreConstant () const
 needed for DocRep interface.

void startPassageIteration (int sz) const
 pass in passage size.

bool hasMorePassage () const
 any passages left?

void nextPassage () const
 next block of psgSize termids, empty positions == OOV (0);

double computeIdfScore (double df) const
double beliefScore (double df, double idf) const
 compute the belief score for a given tf/idf.


Public Attributes

lemur::api::DOCID_T did
 the document id.

int start
 start position of a passage

int end
 end position of a passage


Private Attributes

double * idf
 cached term idf values. May be NULL.

int size
 size used by passages

int increment
 passage overlap value. default is size/2.

int docEnd
 length of the document.

double dla
 average document length

double numer
 terms in idf formula

double denom
 terms in idf formula

double defaultBelief
 default belief and 1 - dB.

double oneMinusDB
 default belief and 1 - dB.


Detailed Description

Representation of a document for structured query retrieval method. Provides support for passage level operations on a document.


Constructor & Destructor Documentation

lemur::retrieval::StructQryDocRep::StructQryDocRep lemur::api::DOCID_T  docID,
double *  idfValue,
int  docLength,
int  docCount,
double  docLengthAverage,
double  db
[inline]
 

New StructQryDocRep.

virtual lemur::retrieval::StructQryDocRep::~StructQryDocRep  )  [inline, virtual]
 

no clean up


Member Function Documentation

double lemur::retrieval::StructQryDocRep::beliefScore double  df,
double  idf
const [inline]
 

compute the belief score for a given tf/idf.

double lemur::retrieval::StructQryDocRep::computeIdfScore double  df  )  const [inline]
 

compute idf for the given document frequency as log((|C|+0.5)/df)/(log(|C|+1)

bool lemur::retrieval::StructQryDocRep::hasMorePassage  )  const [inline]
 

any passages left?

void lemur::retrieval::StructQryDocRep::nextPassage  )  const [inline]
 

next block of psgSize termids, empty positions == OOV (0);

virtual double lemur::retrieval::StructQryDocRep::scoreConstant  )  const [inline, virtual]
 

needed for DocRep interface.

Implements lemur::api::DocumentRep.

void lemur::retrieval::StructQryDocRep::startPassageIteration int  sz  )  const [inline]
 

pass in passage size.

virtual double lemur::retrieval::StructQryDocRep::termWeight lemur::api::TERMID_T  termID,
double  dtf,
int  df
const [inline, virtual]
 

Belief score for this term with this dtf.

virtual double lemur::retrieval::StructQryDocRep::termWeight lemur::api::TERMID_T  termID,
const lemur::api::DocInfo info
const [inline, virtual]
 

needed for DocRep interface.


Member Data Documentation

double lemur::retrieval::StructQryDocRep::defaultBelief [private]
 

default belief and 1 - dB.

double lemur::retrieval::StructQryDocRep::denom [private]
 

terms in idf formula

lemur::api::DOCID_T lemur::retrieval::StructQryDocRep::did
 

the document id.

double lemur::retrieval::StructQryDocRep::dla [private]
 

average document length

int lemur::retrieval::StructQryDocRep::docEnd [private]
 

length of the document.

int lemur::retrieval::StructQryDocRep::end [mutable]
 

end position of a passage

double* lemur::retrieval::StructQryDocRep::idf [private]
 

cached term idf values. May be NULL.

int lemur::retrieval::StructQryDocRep::increment [mutable, private]
 

passage overlap value. default is size/2.

double lemur::retrieval::StructQryDocRep::numer [private]
 

terms in idf formula

double lemur::retrieval::StructQryDocRep::oneMinusDB [private]
 

default belief and 1 - dB.

int lemur::retrieval::StructQryDocRep::size [mutable, private]
 

size used by passages

int lemur::retrieval::StructQryDocRep::start [mutable]
 

start position of a passage


The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:06 2010 for Lemur by doxygen 1.3.4