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

lemur::summarization::BasicSumm Class Reference

#include <BasicSumm.hpp>

Inheritance diagram for lemur::summarization::BasicSumm:

lemur::summarization::Summarizer List of all members.

Public Member Functions

 BasicSumm (const lemur::api::Index *inIdx, int inSummLen=5)
 Constructor takes index information and an option default summary length.

virtual void summDocument (const string &docID, const int optLen, const string &qInfo)
 General purpose function that does all summary computation as well as passage marking.

virtual void scorePassages (const string &qInfo)
 Score ALL passages currently in this summarizer, optionally given query terms.

virtual void markPassages (int optLen, const string &qInfo)
 Flag optLen passages for inclusion in summary.

virtual void addPassage (Passage &psg)
 Append a new passage to the list the summarizer will use to generate summary.

virtual void clear (void)
 Clear all scores and passages from the summarizer.

virtual int fetchPassages (Passage *psgs, int optLen) const
 Place marked passages into an array.

virtual int nextPassage (Passage *psg) const
 Get the next passage in iterative manner.

virtual void iterClear (void) const
 Reset to the first summarized passage (in conjunction with nextPassage).

virtual void outputSumm (void) const
 General purpose "send summary to stdout" function.

int isEOS (const string &check)
 Checks for EOS marker.

int hasEOS (const lemur::api::Index *idx, const lemur::api::TermInfoList *tList)
 Determines if any EOS markers are present.

double scorePassage (BasicPassage &psg, const string &qInfo)
 Scores an individual passage.

void findNextPassage (BasicPassage &psg, const lemur::api::Index *idx, const lemur::api::TermInfoList *tList, int eos)
 Locate the next passage in a document by searching for the next EOS or using a max length.

void showPassage (const passageVec *psg, const lemur::api::Index *idx) const
 BasicSumm's method to output a summary (to screen)

void showMarkedPassages () const
 Only display passages flagged as 'marked' as part of the output.


Private Attributes

const lemur::api::Indexidx
int summLen
vector< BasicPassagedoc
int iterCount

Detailed Description

A simple summarizer implementation that uses sentence selection to create summaries. This example shows how a simple summarizer may look, and how to use the Summarizer abstract with the Passage abstract. Note that this implementation is paired with an implementation of Passage called BasicPassage.


Constructor & Destructor Documentation

lemur::summarization::BasicSumm::BasicSumm const lemur::api::Index inIdx,
int  inSummLen = 5
[inline]
 

Constructor takes index information and an option default summary length.


Member Function Documentation

void lemur::summarization::BasicSumm::addPassage Passage psg  )  [virtual]
 

Append a new passage to the list the summarizer will use to generate summary.

Implements lemur::summarization::Summarizer.

void lemur::summarization::BasicSumm::clear void   )  [virtual]
 

Clear all scores and passages from the summarizer.

Implements lemur::summarization::Summarizer.

int lemur::summarization::BasicSumm::fetchPassages Passage psgs,
int  optLen
const [virtual]
 

Place marked passages into an array.

Implements lemur::summarization::Summarizer.

void lemur::summarization::BasicSumm::findNextPassage BasicPassage psg,
const lemur::api::Index idx,
const lemur::api::TermInfoList tList,
int  eos
[inline]
 

Locate the next passage in a document by searching for the next EOS or using a max length.

int lemur::summarization::BasicSumm::hasEOS const lemur::api::Index idx,
const lemur::api::TermInfoList tList
[inline]
 

Determines if any EOS markers are present.

int lemur::summarization::BasicSumm::isEOS const string &  check  )  [inline]
 

Checks for EOS marker.

void lemur::summarization::BasicSumm::iterClear void   )  const [virtual]
 

Reset to the first summarized passage (in conjunction with nextPassage).

Implements lemur::summarization::Summarizer.

void lemur::summarization::BasicSumm::markPassages int  optLen,
const string &  qInfo
[virtual]
 

Flag optLen passages for inclusion in summary.

Implements lemur::summarization::Summarizer.

int lemur::summarization::BasicSumm::nextPassage Passage psg  )  const [virtual]
 

Get the next passage in iterative manner.

Implements lemur::summarization::Summarizer.

void lemur::summarization::BasicSumm::outputSumm void   )  const [virtual]
 

General purpose "send summary to stdout" function.

Implements lemur::summarization::Summarizer.

double lemur::summarization::BasicSumm::scorePassage BasicPassage psg,
const string &  qInfo
[inline]
 

Scores an individual passage.

void lemur::summarization::BasicSumm::scorePassages const string &  qInfo  )  [virtual]
 

Score ALL passages currently in this summarizer, optionally given query terms.

Implements lemur::summarization::Summarizer.

void lemur::summarization::BasicSumm::showMarkedPassages  )  const [inline]
 

Only display passages flagged as 'marked' as part of the output.

void lemur::summarization::BasicSumm::showPassage const passageVec psg,
const lemur::api::Index idx
const [inline]
 

BasicSumm's method to output a summary (to screen)

void lemur::summarization::BasicSumm::summDocument const string &  docID,
const int  optLen,
const string &  qInfo
[virtual]
 

General purpose function that does all summary computation as well as passage marking.

Implements lemur::summarization::Summarizer.


Member Data Documentation

vector<BasicPassage> lemur::summarization::BasicSumm::doc [private]
 

const lemur::api::Index* lemur::summarization::BasicSumm::idx [private]
 

int lemur::summarization::BasicSumm::iterCount [mutable, private]
 

int lemur::summarization::BasicSumm::summLen [private]
 


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