strusAnalyzer  0.17
patternLexerContextInterface.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_LEXER_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_LEXER_CONTEXT_INTERFACE_HPP_INCLUDED
13 #include <vector>
14 
15 namespace strus
16 {
17 
20 {
21 public:
24 
29  virtual std::vector<analyzer::PatternLexem> match( const char* src, std::size_t srclen)=0;
30 
32  virtual void reset()=0;
33 };
34 
35 } //namespace
36 #endif
37 
38 
virtual void reset()=0
Reset the pattern lexer context for a reuse within another document or query.
virtual std::vector< analyzer::PatternLexem > match(const char *src, std::size_t srclen)=0
Do process a document source string to return a list of labeled terms (lexems) found that matched...
Interface for detecting lexems used as basic entities by pattern matching in text.
Definition: patternLexerContextInterface.hpp:19
virtual ~PatternLexerContextInterface()
Destructor.
Definition: patternLexerContextInterface.hpp:23
Structure describing a token with id (an output item of char regex matching and an input item for tok...