strusAnalyzer  0.17
patternTermFeederInstanceInterface.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_TERM_FEEDER_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_TERM_FEEDER_INSTANCE_INTERFACE_HPP_INCLUDED
15 #include <string>
16 
17 namespace strus
18 {
21 {
22 public:
25 
31  virtual void defineLexem(
32  unsigned int id,
33  const std::string& type)=0;
34 
39  virtual void defineSymbol(
40  unsigned int id,
41  unsigned int lexemid,
42  const std::string& name)=0;
43 
47  virtual unsigned int getLexem(
48  const std::string& type) const=0;
49 
52  virtual std::vector<std::string> lexemTypes() const=0;
53 
59  virtual unsigned int getSymbol(
60  unsigned int lexemid,
61  const std::string& name) const=0;
62 
65  virtual analyzer::FunctionView view() const=0;
66 };
67 
68 } //namespace
69 #endif
70 
virtual std::vector< std::string > lexemTypes() const =0
Get the list of lexem types defined.
Instance interface for defining a mapping of terms of the document analysis outout as lexems used as ...
Definition: patternTermFeederInstanceInterface.hpp:20
virtual analyzer::FunctionView view() const =0
Get the definition of the function as structure for introspection.
virtual unsigned int getLexem(const std::string &type) const =0
Get the value of a defined lexem by type.
virtual ~PatternTermFeederInstanceInterface()
Destructor.
Definition: patternTermFeederInstanceInterface.hpp:24
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
virtual void defineSymbol(unsigned int id, unsigned int lexemid, const std::string &name)=0
Define a symbol, an instance of a basic lexem, that gets a different id than the basic lexem...
Structure desribing a result of a token pattern matcher.
virtual unsigned int getSymbol(unsigned int lexemid, const std::string &name) const =0
Get the identifier of a defined symbol.
virtual void defineLexem(unsigned int id, const std::string &type)=0
Define a term type.
Structure describing a token with id (an output item of char regex matching and an input item for tok...