FreeLing
4.0
|
The class rule_expression stores the conditions for a labeler_rule. More...
#include <dep_rules.h>
Public Types | |
enum | expression_type { AND, NOT, SIDE, LEMMA, POS, LABEL, WORDCLASS, TONTO, SEMFILE, SYNON, ASYNON, PAIRCLASS } |
Public Member Functions | |
rule_expression () | |
rule_expression (expression_type t) | |
rule_expression (expression_type t, const rule_expression &re) | |
rule_expression (expression_type t, const std::wstring &nd, const std::wstring &val) | |
rule_expression (expression_type t, const std::wstring &nd, const std::wstring &val, const std::set< std::wstring > &wclas) | |
rule_expression (expression_type t, const std::wstring &nd1, const std::wstring &nd2, const std::wstring &val, const std::set< std::wstring > &pairclas) | |
rule_expression (expression_type t, const std::wstring &nd, const std::wstring &val, const semanticDB &sdb) | |
~rule_expression () | |
void | add (const rule_expression &re) |
void | set_type (expression_type t) |
bool | find (const std::wstring &) const |
bool | find_match (const std::wstring &) const |
bool | match (const std::wstring &) const |
bool | find_any (const std::list< std::wstring > &) const |
bool | find_any_match (const std::list< std::wstring > &) const |
bool | check (dep_tree::const_iterator, dep_tree::const_iterator) const |
bool | eval (dep_tree::const_iterator n1, dep_tree::const_iterator n2=(const dep_tree *) NULL) const |
Protected Member Functions | |
bool | nodes_to_check (const std::wstring &node, dep_tree::const_iterator, dep_tree::const_iterator, std::list< dep_tree::const_iterator > &) const |
Static Protected Member Functions | |
static void | parse_node_ref (std::wstring, dep_tree::const_iterator, std::list< dep_tree::const_iterator > &) |
static void | parse_node_ref (std::wstring, parse_tree::const_iterator, std::list< parse_tree::const_iterator > &) |
Protected Attributes | |
std::wstring | node1 |
std::wstring | node2 |
std::set< std::wstring > | valueList |
Private Member Functions | |
std::wstring | extract_value (const std::wstring &fun, dep_tree::const_iterator n) const |
access requested information (lemma, pos, label) from given node | |
Private Attributes | |
expression_type | type |
std::list< rule_expression > | check_list |
const std::set< std::wstring > * | wordclasses |
const std::set< std::wstring > * | pairclasses |
const semanticDB * | semdb |
Friends | |
class | dep_txala |
The class rule_expression stores the conditions for a labeler_rule.
freeling::rule_expression::rule_expression | ( | expression_type | t, |
const rule_expression & | re | ||
) |
freeling::rule_expression::rule_expression | ( | expression_type | t, |
const std::wstring & | nd, | ||
const std::wstring & | val | ||
) |
freeling::rule_expression::rule_expression | ( | expression_type | t, |
const std::wstring & | nd, | ||
const std::wstring & | val, | ||
const std::set< std::wstring > & | wclas | ||
) |
freeling::rule_expression::rule_expression | ( | expression_type | t, |
const std::wstring & | nd1, | ||
const std::wstring & | nd2, | ||
const std::wstring & | val, | ||
const std::set< std::wstring > & | pairclas | ||
) |
freeling::rule_expression::rule_expression | ( | expression_type | t, |
const std::wstring & | nd, | ||
const std::wstring & | val, | ||
const semanticDB & | sdb | ||
) |
void freeling::rule_expression::add | ( | const rule_expression & | re | ) |
bool freeling::rule_expression::eval | ( | dep_tree::const_iterator | n1, |
dep_tree::const_iterator | n2 = (const dep_tree *) NULL |
||
) | const |
std::wstring freeling::rule_expression::extract_value | ( | const std::wstring & | fun, |
dep_tree::const_iterator | n | ||
) | const [private] |
access requested information (lemma, pos, label) from given node
bool freeling::rule_expression::find | ( | const std::wstring & | ) | const |
bool freeling::rule_expression::find_any | ( | const std::list< std::wstring > & | ) | const |
bool freeling::rule_expression::find_any_match | ( | const std::list< std::wstring > & | ) | const |
bool freeling::rule_expression::find_match | ( | const std::wstring & | ) | const |
bool freeling::rule_expression::match | ( | const std::wstring & | ) | const |
bool freeling::rule_expression::nodes_to_check | ( | const std::wstring & | node, |
dep_tree::const_iterator | , | ||
dep_tree::const_iterator | , | ||
std::list< dep_tree::const_iterator > & | |||
) | const [protected] |
static void freeling::rule_expression::parse_node_ref | ( | std::wstring | , |
dep_tree::const_iterator | , | ||
std::list< dep_tree::const_iterator > & | |||
) | [static, protected] |
static void freeling::rule_expression::parse_node_ref | ( | std::wstring | , |
parse_tree::const_iterator | , | ||
std::list< parse_tree::const_iterator > & | |||
) | [static, protected] |
friend class dep_txala [friend] |
std::list<rule_expression> freeling::rule_expression::check_list [private] |
std::wstring freeling::rule_expression::node1 [protected] |
std::wstring freeling::rule_expression::node2 [protected] |
const std::set<std::wstring>* freeling::rule_expression::pairclasses [private] |
const semanticDB* freeling::rule_expression::semdb [private] |
std::set<std::wstring> freeling::rule_expression::valueList [protected] |
const std::set<std::wstring>* freeling::rule_expression::wordclasses [private] |