Defines the context for segmenting one document.
More...
#include <segmenterContextInterface.hpp>
Defines the context for segmenting one document.
virtual strus::SegmenterContextInterface::~SegmenterContextInterface |
( |
| ) |
|
|
inlinevirtual |
virtual bool strus::SegmenterContextInterface::getNext |
( |
int & |
id, |
|
|
SegmenterPosition & |
pos, |
|
|
const char *& |
segment, |
|
|
std::size_t & |
segmentsize |
|
) |
| |
|
pure virtual |
Fetch the next text segment.
- Parameters
-
[out] | id | identifier of the expression that addresses the text segment (defined with SegmenterInterface::defineSelectorExpression(int, const std::string&) or with SegmenterInterface::defineSubSection(int,int,const std::string&)) |
[out] | pos | position of the segment in the original source |
[out] | segment | pointer to the start of the segment. |
[out] | segmentsize | size of segment in bytes |
- Returns
- true, if a valid segment could be returned, false in case of no segments left or more required to be fed
- Note
- returned chunks only valid after the call, owned by the segmenter
virtual void strus::SegmenterContextInterface::putInput |
( |
const char * |
chunk, |
|
|
std::size_t |
chunksize, |
|
|
bool |
eof |
|
) |
| |
|
pure virtual |
Feed the segmenter with the next chunk of input to process.
- Parameters
-
[in] | chunk | pointer to input chunk to process (to copy by this) |
[in] | chunksize | size of input chunk to process in bytes |
[in] | eof | true, if this is the last chunk to feed |
The documentation for this class was generated from the following file: