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

indri::api::SnippetBuilder Class Reference

#include <SnippetBuilder.hpp>

List of all members.

Public Member Functions

 SnippetBuilder (bool html)
std::string build (int documentID, const indri::api::ParsedDocument *document, indri::api::QueryAnnotation *annotation)

Private Member Functions

void _getRawNodes (std::vector< std::string > &nodeNames, const indri::api::QueryAnnotationNode *node)
std::vector< std::pair< indri::index::Extent,
int > > 
_documentMatches (int document, const std::map< std::string, std::vector< indri::api::ScoredExtentResult > > &annotations, const std::vector< std::string > &nodeNames)
std::vector< Region_buildRegions (std::vector< std::pair< indri::index::Extent, int > > &extents, int positionCount, int matchWidth, int windowWidth)
Region _bestRegion (const std::vector< std::pair< indri::index::Extent, int > > &extents, const std::vector< indri::api::SnippetBuilder::Region > &skipRegions, int positionCount, int windowWidth)
char * _sanitizeText (const char *text, int begin, int length)
void _addEllipsis (std::string &snippet)
void _addHighlightedRegion (std::string &snippet, char *region)
void _addUnhighlightedRegion (std::string &snippet, char *region)
void _completeSnippet (std::string &snippet)

Private Attributes

bool _HTMLOutput

Constructor & Destructor Documentation

indri::api::SnippetBuilder::SnippetBuilder bool  html  )  [inline]

Member Function Documentation

void indri::api::SnippetBuilder::_addEllipsis std::string &  snippet  )  [private]

void indri::api::SnippetBuilder::_addHighlightedRegion std::string &  snippet,
char *  region

void indri::api::SnippetBuilder::_addUnhighlightedRegion std::string &  snippet,
char *  region

indri::api::SnippetBuilder::Region indri::api::SnippetBuilder::_bestRegion const std::vector< std::pair< indri::index::Extent, int > > &  extents,
const std::vector< indri::api::SnippetBuilder::Region > &  skipRegions,
int  positionCount,
int  windowWidth

std::vector< indri::api::SnippetBuilder::Region > indri::api::SnippetBuilder::_buildRegions std::vector< std::pair< indri::index::Extent, int > > &  extents,
int  positionCount,
int  matchWidth,
int  windowWidth

void indri::api::SnippetBuilder::_completeSnippet std::string &  snippet  )  [private]

std::vector< std::pair< indri::index::Extent, int > > indri::api::SnippetBuilder::_documentMatches int  document,
const std::map< std::string, std::vector< indri::api::ScoredExtentResult > > &  annotations,
const std::vector< std::string > &  nodeNames

void indri::api::SnippetBuilder::_getRawNodes std::vector< std::string > &  nodeNames,
const indri::api::QueryAnnotationNode node

char * indri::api::SnippetBuilder::_sanitizeText const char *  text,
int  begin,
int  length

std::string indri::api::SnippetBuilder::build int  documentID,
const indri::api::ParsedDocument document,
indri::api::QueryAnnotation annotation

Member Data Documentation

bool indri::api::SnippetBuilder::_HTMLOutput [private]

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