strusAnalyzer  0.17
segmenterInterface.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_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_SEGMENTER_INTERFACE_HPP_INCLUDED
14 #include <vector>
15 #include <string>
16 #include <utility>
17 
19 namespace strus
20 {
21 
23 class SegmenterInstanceInterface;
25 class ContentIteratorInterface;
26 
30 {
31 public:
33  virtual ~SegmenterInterface(){}
34 
37  virtual const char* mimeType() const=0;
38 
42 
52  const char* content,
53  std::size_t contentsize,
54  const std::vector<std::string>& attributes,
55  const std::vector<std::string>& expressions,
56  const analyzer::DocumentClass& dclass,
58 
61  virtual const char* getDescription() const=0;
62 };
63 
64 }//namespace
65 #endif
66 
67 
Defines a description of the properties of an original document processed by the segmenter.
Definition: documentClass.hpp:21
Defines a program for splitting a source text it into chunks with an id correspoding to a selecting e...
Definition: segmenterInstanceInterface.hpp:25
Options to stear the segmenter behaviour or the structure of input if not self defined in the documen...
Definition: segmenterOptions.hpp:25
Structure describing the MIME type plus some attributes that could be relevant for analysis of a docu...
virtual const char * mimeType() const =0
Get the mime type accepted by this segmenter.
virtual ContentIteratorInterface * createContentIterator(const char *content, std::size_t contentsize, const std::vector< std::string > &attributes, const std::vector< std::string > &expressions, const analyzer::DocumentClass &dclass, const analyzer::SegmenterOptions &opts=analyzer::SegmenterOptions()) const =0
Create an iterator on content for statistics.
virtual ~SegmenterInterface()
Destructor.
Definition: segmenterInterface.hpp:33
virtual const char * getDescription() const =0
Get a description of the function for user help.
Defines an iterator on content provided by a segmenter.
Definition: contentIteratorInterface.hpp:23
virtual SegmenterInstanceInterface * createInstance(const analyzer::SegmenterOptions &opts=analyzer::SegmenterOptions()) const =0
Create a parameterizable segmenter instance.
Options to stear the segmenter behaviour or the structure of input if not self defined in the documen...
Defines an interface for creating instances of programs for document segmentation.
Definition: segmenterInterface.hpp:29