strusAnalyzer  0.17
documentClassDetectorInterface.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_CLASS_DETECTOR_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_DOCUMENT_CLASS_DETECTOR_INTERFACE_HPP_INCLUDED
13 #include <vector>
14 #include <string>
15 
17 namespace strus
18 {
19 
22 {
23 public:
26 
32  virtual void defineDocumentSchemeDetector(
33  const std::string& scheme,
34  const std::string& mimeType,
35  const std::vector<std::string>& select_expressions,
36  const std::vector<std::string>& reject_expressions)=0;
37 
45  virtual bool detect( analyzer::DocumentClass& dclass, const char* contentBegin, std::size_t contentBeginSize, bool isComplete) const=0;
46 };
47 
48 }//namespace
49 #endif
50 
Defines a description of the properties of an original document processed by the segmenter.
Definition: documentClass.hpp:21
Structure describing the MIME type plus some attributes that could be relevant for analysis of a docu...
virtual bool detect(analyzer::DocumentClass &dclass, const char *contentBegin, std::size_t contentBeginSize, bool isComplete) const =0
Scans the start of a document to detect its classification attributes (mime type, etc...
Defines a detector that returns a content description for a document content it recognizes.
Definition: documentClassDetectorInterface.hpp:21
virtual ~DocumentClassDetectorInterface()
Destructor.
Definition: documentClassDetectorInterface.hpp:25
virtual void defineDocumentSchemeDetector(const std::string &scheme, const std::string &mimeType, const std::vector< std::string > &select_expressions, const std::vector< std::string > &reject_expressions)=0
Define a detector for a document scheme.