#include <PassageRep.hpp>
Inheritance diagram for lemur::retrieval::PassageRep:
Public Member Functions | |
PassageRep (lemur::api::DocumentRep &dRep, int d, int p, int o) | |
Fixed sized window passage with overlap. | |
PassageRep::iterator | begin () |
PassageRep::iterator | end () |
void | setEnd (int s, int e, int dl) |
update end and length values | |
int | passageTF (lemur::api::TERMID_T tid, lemur::api::MatchInfo *matches) const |
Term frequency of a term within the current passage. | |
int | getStart () const |
start of the current passage | |
int | getEnd () const |
end + 1 of the current passage | |
virtual double | termWeight (lemur::api::TERMID_T termID, const lemur::api::DocInfo *info) const |
Delegate call to termWeight of the encapsulated DocumentRep. | |
virtual double | scoreConstant () const |
Delegate call to scoreConstant of the encapsulated DocumentRep. | |
Protected Attributes | |
lemur::api::DocumentRep & | docRep |
DocumentRep for the whole document. Calls to termWeight and scoreConstant are delegated to it. | |
int | psgSize |
Size of the passage, in number of tokens. | |
int | overlap |
Number of tokens to overlap when advancing the passage window. | |
int | docEnd |
Length of the whole document. | |
int | start |
index of start of the current passage. | |
int | pEnd |
index of end of the current passage. |
Supports iteration over passages of fixed window size with an overlap of K terms for the window. Encapsulates the DocumentRep for the whole document, modifying its docLength attribute. Delegates calls to termWeight and scoreConstant to the encapsulated DocumentRep. TFIDFRetMethod with BM25 tf weighting and OkapiRetMethod will not compute correct scores, as they use the average document length from the collection in their formulas. The difference should be small.
|
Fixed sized window passage with overlap.
|
|
|
|
|
|
end + 1 of the current passage
|
|
start of the current passage
|
|
Term frequency of a term within the current passage.
|
|
Delegate call to scoreConstant of the encapsulated DocumentRep.
Implements lemur::api::DocumentRep. |
|
update end and length values
|
|
Delegate call to termWeight of the encapsulated DocumentRep.
|
|
Length of the whole document.
|
|
DocumentRep for the whole document. Calls to termWeight and scoreConstant are delegated to it.
|
|
Number of tokens to overlap when advancing the passage window.
|
|
index of end of the current passage.
|
|
Size of the passage, in number of tokens.
|
|
index of start of the current passage.
|