|
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 |