Concordia
|
#include <regex_rule.hpp>
Public Member Functions | |
RegexRule (std::string patternString, int annotationType, std::string value, bool caseSensitive=true) throw (ConcordiaException) | |
virtual | ~RegexRule () |
void | apply (TokenizedSentence &sentence) |
Class for representing a regular expression annotation rule. Holds regex pattern string for matching and default value to assign to the annotations. Rule also has a type, given to all annotations produced by it.
RegexRule::RegexRule | ( | std::string | patternString, |
int | annotationType, | ||
std::string | value, | ||
bool | caseSensitive = true |
||
) | |||
throw | ( | ConcordiaException | |
) |
Constructor.
patternString | regex pattern to match |
annoationType | type of annotation |
value | value to be assigned to the annotation |
caseSensitive | case sensitivity of the pattern |
|
virtual |
Destructor.
void RegexRule::apply | ( | TokenizedSentence & | sentence | ) |
Applies regex annotation on tokenized sentence.
sentence | the input sentence |