strusAnalyzer  0.17
documentAnalyzerMapInterface.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_DOCUMENT_ANALYZER_MAP_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_DOCUMENT_ANALYZER_MAP_INTERFACE_HPP_INCLUDED
15 #include <vector>
16 #include <string>
17 
19 namespace strus
20 {
21 
23 class DocumentAnalyzerContextInterface;
25 class DocumentAnalyzerInstanceInterface;
26 
29 {
30 public:
33 
39  const std::string& mimeType,
40  const std::string& scheme) const=0;
41 
46  virtual void addAnalyzer(
47  const std::string& mimeType,
48  const std::string& scheme,
50 
55  const std::string& mimeType,
56  const std::string& scheme) const=0;
57 
64  const std::string& content,
65  const analyzer::DocumentClass& dclass) const=0;
66 
71  const analyzer::DocumentClass& dclass) const=0;
72 
75  virtual analyzer::DocumentAnalyzerMapView view() const=0;
76 };
77 
78 }//namespace
79 #endif
80 
Structure describing the internal representation of a document analyzer map for introspection.
Definition: documentAnalyzerMapView.hpp:44
Defines a description of the properties of an original document processed by the segmenter.
Definition: documentClass.hpp:21
Defines the context for analyzing multi part documents, iterating on the sub documents defined...
Definition: documentAnalyzerContextInterface.hpp:21
virtual DocumentAnalyzerContextInterface * createContext(const analyzer::DocumentClass &dclass) const =0
Create the context used for analyzing multipart or very big documents.
virtual analyzer::DocumentAnalyzerMapView view() const =0
Return a structure with all definitions for introspection.
Defines a program for analyzing a document, splitting it into normalized terms that can be fed to the...
Definition: documentAnalyzerMapInterface.hpp:28
Structure describing the MIME type plus some attributes that could be relevant for analysis of a docu...
virtual DocumentAnalyzerInstanceInterface * createAnalyzer(const std::string &mimeType, const std::string &scheme) const =0
Declare a an analyzer interface to instrument and and add with addAnalyzer.
virtual const DocumentAnalyzerInstanceInterface * getAnalyzer(const std::string &mimeType, const std::string &scheme) const =0
Get the analyzer interface assigned to a document class.
virtual void addAnalyzer(const std::string &mimeType, const std::string &scheme, DocumentAnalyzerInstanceInterface *analyzer)=0
Declare a an analyzer to be used for the analysis of a specific document class.
Defines a program for analyzing a document, splitting it into normalized terms that can be fed to the...
Definition: documentAnalyzerInstanceInterface.hpp:43
Structure of a document as result of document analysis.
virtual analyzer::Document analyze(const std::string &content, const analyzer::DocumentClass &dclass) const =0
Segment and tokenize a document, assign types to tokens and metadata and normalize their values...
Structure of a document created as result of a document analysis.
Definition: document.hpp:25
virtual ~DocumentAnalyzerMapInterface()
Destructor.
Definition: documentAnalyzerMapInterface.hpp:32