10 #ifndef _STRUS_ANALYZER_PATTERN_LEXER_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_LEXER_INSTANCE_INTERFACE_HPP_INCLUDED
20 class PatternLexerContextInterface;
32 virtual void defineOption(
const std::string& name,
double value)=0;
38 virtual void defineLexemName(
unsigned int id,
const std::string& name)=0;
49 const std::string& expression,
50 unsigned int resultIndex,
62 const std::string& name)=0;
71 const std::string& name)
const=0;
76 virtual const char*
getLexemName(
unsigned int id)
const=0;
virtual const char * getLexemName(unsigned int id) const =0
Retrieve the name given to a lexem or symbol.
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Interface for building the automaton for detecting lexems used as basic entities by pattern matching ...
Definition: patternLexerInstanceInterface.hpp:23
PositionBind
Determines how document ordinal positions are assigned to terms.
Definition: positionBind.hpp:20
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Definition: functionView.hpp:29
virtual ~PatternLexerInstanceInterface()
Destructor.
Definition: patternLexerInstanceInterface.hpp:27
virtual bool compile()=0
Compile all patterns and symbols defined.
virtual void defineLexemName(unsigned int id, const std::string &name)=0
Assign a name to a lexem or symbol identifier.
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...
virtual void defineOption(const std::string &name, double value)=0
Define an option value for the compilation.
virtual unsigned int getSymbol(unsigned int lexemid, const std::string &name) const =0
Get the value of a defined symbol.
Interface for detecting lexems used as basic entities by pattern matching in text.
Definition: patternLexerContextInterface.hpp:19
virtual PatternLexerContextInterface * createContext() const =0
Create the context to process a chunk of text with this text matcher.
virtual void defineLexem(unsigned int id, const std::string &expression, unsigned int resultIndex, unsigned int level, analyzer::PositionBind posbind)=0
Define a pattern for detecting a basic lexem of this pattern matching lexer.
virtual analyzer::FunctionView view() const =0
Get the definition of the function as structure for introspection.