The class completerRule stores rules used by the completer of parse trees. More...
#include <dep_rules.h>
Public Member Functions | |
completerRule () | |
constructors | |
completerRule (const std::string &, const std::string &, const std::string &) | |
completerRule (const completerRule &) | |
Constructor. | |
completerRule & | operator= (const completerRule &) |
assignment | |
int | operator< (const completerRule &a) const |
Comparison. The more weight the higher priority. | |
Public Attributes | |
std::string | leftChk |
chunk labels to which the rule is applied | |
std::string | rightChk |
std::list< std::string > | leftConds |
extra conditions on the chunks (lemma, form, class, ...) | |
std::list< std::string > | rightConds |
RegEx | leftRE |
RegExp for extra conditions on the chunks (PoS). | |
RegEx | rightRE |
std::string | newNode1 |
new label/s (if any) for the nodes after the operation. Also used to store MATCHING labels. | |
std::string | newNode2 |
std::string | operation |
operation to perform | |
std::string | context |
context (if any) required to apply the rule | |
bool | context_neg |
whether the context is negated | |
int | weight |
priority of the rule | |
parse_tree::iterator | last |
precomputed last node matching the "last_left/right" condition | |
std::set< std::string > | enabling_flags |
flags that enable the rule to be applied | |
std::set< std::string > | flags_toggle_on |
flags to toggle on after applying the rule | |
std::set< std::string > | flags_toggle_off |
flags to toggle off after applying the rule | |
int | line |
line in the file where rule was, useful to trace and issue errors |
The class completerRule stores rules used by the completer of parse trees.
completerRule::completerRule | ( | const std::string & | , | |
const std::string & | , | |||
const std::string & | ||||
) |
completerRule::completerRule | ( | const completerRule & | cr | ) |
Constructor.
References context, context_neg, enabling_flags, flags_toggle_off, flags_toggle_on, last, leftChk, leftConds, leftRE, line, newNode1, newNode2, operation, rightChk, rightConds, rightRE, and weight.
int completerRule::operator< | ( | const completerRule & | a | ) | const |
Comparison. The more weight the higher priority.
Comparison.
The smaller weight, the higher priority
References weight.
completerRule & completerRule::operator= | ( | const completerRule & | cr | ) |
assignment
Assignment.
References context, context_neg, enabling_flags, flags_toggle_off, flags_toggle_on, last, leftChk, leftConds, leftRE, line, newNode1, newNode2, operation, rightChk, rightConds, rightRE, and weight.
std::string completerRule::context |
context (if any) required to apply the rule
Referenced by completerRule(), and operator=().
whether the context is negated
Referenced by completerRule(), and operator=().
std::set<std::string> completerRule::enabling_flags |
flags that enable the rule to be applied
Referenced by completerRule(), completer::enabled_rule(), and operator=().
std::set<std::string> completerRule::flags_toggle_off |
flags to toggle off after applying the rule
Referenced by completer::applyRule(), completerRule(), and operator=().
std::set<std::string> completerRule::flags_toggle_on |
flags to toggle on after applying the rule
Referenced by completer::applyRule(), completerRule(), and operator=().
parse_tree::iterator completerRule::last |
precomputed last node matching the "last_left/right" condition
Referenced by completer::applyRule(), completerRule(), and operator=().
std::string completerRule::leftChk |
chunk labels to which the rule is applied
Referenced by completerRule(), and operator=().
std::list<std::string> completerRule::leftConds |
extra conditions on the chunks (lemma, form, class, ...)
Referenced by completerRule(), and operator=().
RegEx completerRule::leftRE |
RegExp for extra conditions on the chunks (PoS).
Referenced by completerRule(), and operator=().
line in the file where rule was, useful to trace and issue errors
Referenced by completerRule(), and operator=().
std::string completerRule::newNode1 |
new label/s (if any) for the nodes after the operation. Also used to store MATCHING labels.
Referenced by completer::applyRule(), completerRule(), and operator=().
std::string completerRule::newNode2 |
Referenced by completer::applyRule(), completerRule(), and operator=().
std::string completerRule::operation |
operation to perform
Referenced by completer::applyRule(), completerRule(), and operator=().
std::string completerRule::rightChk |
Referenced by completerRule(), and operator=().
std::list<std::string> completerRule::rightConds |
Referenced by completerRule(), and operator=().
RegEx completerRule::rightRE |
Referenced by completerRule(), and operator=().
priority of the rule
Referenced by completerRule(), operator<(), and operator=().