strusAnalyzer  0.17
patternMatcherContextInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 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_PATTERN_MATCHER_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_MATCHER_CONTEXT_INTERFACE_HPP_INCLUDED
15 #include <vector>
16 
17 namespace strus
18 {
19 
22 {
23 public:
26 
30  virtual void putInput( const analyzer::PatternLexem& token)=0;
31 
34  virtual std::vector<analyzer::PatternMatcherResult> fetchResults()=0;
35 
39 
41  virtual void reset()=0;
42 };
43 
44 } //namespace
45 #endif
46 
Structure describing a token with an id used for pattern matching.
Definition: patternLexem.hpp:20
Object descriping the statistics of a token pattern match run for runtime analysis.
Definition: patternMatcherStatistics.hpp:18
virtual void putInput(const analyzer::PatternLexem &token)=0
Feed the next input token.
virtual std::vector< analyzer::PatternMatcherResult > fetchResults()=0
Get the list of matches detected in the current document.
Structure desribing a result of a token pattern matcher.
virtual analyzer::PatternMatcherStatistics getStatistics() const =0
Get the statistics for global analysis.
virtual void reset()=0
Reset the pattern matching context for a reuse within another document or query.
Interface for detecting patterns (structures formed by atomic tokens) in one document.
Definition: patternMatcherContextInterface.hpp:21
virtual ~PatternMatcherContextInterface()
Destructor.
Definition: patternMatcherContextInterface.hpp:25
Structure describing a token with id (an output item of char regex matching and an input item for tok...