strusAnalyzer  0.17
segmenterContextInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_ANALYZER_SEGMENTER_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_SEGMENTER_CONTEXT_INTERFACE_HPP_INCLUDED
12 #include <utility>
13 #include <string>
14 
16 namespace strus
17 {
18 
20 typedef int SegmenterPosition;
21 
25 {
26 public:
29 
35  virtual void putInput( const char* chunk, std::size_t chunksize, bool eof)=0;
36 
45  virtual bool getNext( int& id, SegmenterPosition& pos, const char*& segment, std::size_t& segmentsize)=0;
46 };
47 
48 }//namespace
49 #endif
50 
int SegmenterPosition
Position of a segment in the original source.
Definition: segmenterContextInterface.hpp:20
virtual void putInput(const char *chunk, std::size_t chunksize, bool eof)=0
Feed the segmenter with the next chunk of input to process.
Defines the context for segmenting one document.
Definition: segmenterContextInterface.hpp:24
virtual bool getNext(int &id, SegmenterPosition &pos, const char *&segment, std::size_t &segmentsize)=0
Fetch the next text segment.
virtual ~SegmenterContextInterface()
Destructor.
Definition: segmenterContextInterface.hpp:28