strusAnalyzer  0.17
segmenterInstanceInterface.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_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_SEGMENTER_INSTANCE_INTERFACE_HPP_INCLUDED
14 #include <string>
15 
17 namespace strus
18 {
20 class SegmenterContextInterface;
22 class SegmenterMarkupContextInterface;
23 
26 {
27 public:
30 
34  virtual void defineSelectorExpression( int id, const std::string& expression)=0;
35 
40  virtual void defineSubSection( int startId, int endId, const std::string& expression)=0;
41 
45  virtual SegmenterContextInterface* createContext( const analyzer::DocumentClass& dclass) const=0;
46 
52  const analyzer::DocumentClass& dclass,
53  const std::string& content) const=0;
54 
57  virtual analyzer::FunctionView view() const=0;
58 };
59 
60 }//namespace
61 #endif
62 
Defines a description of the properties of an original document processed by the segmenter.
Definition: documentClass.hpp:21
virtual analyzer::FunctionView view() const =0
Get the definition of the function as structure for introspection.
virtual ~SegmenterInstanceInterface()
Destructor.
Definition: segmenterInstanceInterface.hpp:29
Defines a program for splitting a source text it into chunks with an id correspoding to a selecting e...
Definition: segmenterInstanceInterface.hpp:25
Structure describing the MIME type plus some attributes that could be relevant for analysis of a docu...
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Definition: functionView.hpp:29
virtual SegmenterContextInterface * createContext(const analyzer::DocumentClass &dclass) const =0
Creates a context for segmenting one document of a specified class.
virtual void defineSubSection(int startId, int endId, const std::string &expression)=0
Defines an expression for identifying a sub section of the document.
virtual SegmenterMarkupContextInterface * createMarkupContext(const analyzer::DocumentClass &dclass, const std::string &content) const =0
Creates an instance of the segmenters document markup context.
Defines the context for segmenting one document.
Definition: segmenterContextInterface.hpp:24
virtual void defineSelectorExpression(int id, const std::string &expression)=0
Defines an expression for selecting chunks from a document.
Defines the context for inserting markups into one document.
Definition: segmenterMarkupContextInterface.hpp:21