strusAnalyzer  0.17
contentStatisticsInterface.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_CONTENT_STATISTICS_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_CONTENT_STATISTICS_INTERFACE_HPP_INCLUDED
15 #include <vector>
16 #include <string>
17 
19 namespace strus
20 {
21 
23 class NormalizerFunctionInstanceInterface;
25 class TokenizerFunctionInstanceInterface;
27 class SegmenterInterface;
29 class TextProcessorInterface;
30 
33 {
34 public:
37 
46  virtual void addLibraryElement(
47  const std::string& type,
48  const std::string& regex,
49  int priority,
50  int minLength,
51  int maxLength,
53  const std::vector<NormalizerFunctionInstanceInterface*>& normalizers)=0;
54 
57  virtual void addVisibleAttribute( const std::string& name)=0;
58 
61  virtual void addSelectorExpression( const std::string& expression)=0;
62 
66 
69  virtual analyzer::ContentStatisticsView view() const=0;
70 };
71 
72 }//namespace
73 #endif
74 
virtual ~ContentStatisticsInterface()
Destructor.
Definition: contentStatisticsInterface.hpp:36
Interface for context for collecting content statistics.
Structure describing an item of the structure statistics analysis of a document.
Defines a program for analyzing a document, splitting it into normalized terms that can be fed to the...
Definition: contentStatisticsInterface.hpp:32
Defines a program for analyzing a document, splitting it into normalized terms that can be fed to the...
Definition: contentStatisticsContextInterface.hpp:22
virtual void addSelectorExpression(const std::string &expression)=0
Define a selector expression that is chosen for content elements that matches it. ...
Structure describing the internal representation of a content statistics library. ...
Definition: contentStatisticsView.hpp:22
virtual analyzer::ContentStatisticsView view() const =0
Return a structure with all definitions for introspection.
Interface for tokenization.
Definition: tokenizerFunctionInstanceInterface.hpp:21
virtual ContentStatisticsContextInterface * createContext() const =0
Create the context used for collecting document statitics.
Structures describing the internal representation of an aggregator in a document analyzer.
virtual void addVisibleAttribute(const std::string &name)=0
Define an attribute to be visible in content statistics path conditions.
virtual void addLibraryElement(const std::string &type, const std::string &regex, int priority, int minLength, int maxLength, TokenizerFunctionInstanceInterface *tokenizer, const std::vector< NormalizerFunctionInstanceInterface * > &normalizers)=0
Declare an element of the library used to categorize features.