strusAnalyzer  0.17
tokenizerFunctionInstanceInterface.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_TOKENIZER_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_TOKENIZER_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
13 #include "strus/analyzer/token.hpp"
14 #include <string>
15 #include <vector>
16 
18 namespace strus {
19 
22 {
23 public:
26 
30  virtual bool concatBeforeTokenize() const=0;
31 
35  virtual std::vector<analyzer::Token> tokenize( const char* src, std::size_t srcsize) const=0;
36 
39  virtual analyzer::FunctionView view() const=0;
40 };
41 
42 }//namespace
43 #endif
44 
45 
Structure describing a token in the document by its start position and size.
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Definition: functionView.hpp:29
Interface for tokenization.
Definition: tokenizerFunctionInstanceInterface.hpp:21
virtual bool concatBeforeTokenize() const =0
Flag defined by tokenizer indicating that different segments defined by the tag hierarchy should be c...
virtual std::vector< analyzer::Token > tokenize(const char *src, std::size_t srcsize) const =0
Tokenize a segment into a list of tokens.
virtual analyzer::FunctionView view() const =0
Get the definition of the function as structure for introspection.
virtual ~TokenizerFunctionInstanceInterface()
Destructor.
Definition: tokenizerFunctionInstanceInterface.hpp:25