FreeLing  4.0
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
freeling::rule_expression Class Reference

The class rule_expression stores the conditions for a labeler_rule. More...

#include <dep_rules.h>

Collaboration diagram for freeling::rule_expression:
Collaboration graph
[legend]

List of all members.

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_expressioncheck_list
const std::set< std::wstring > * wordclasses
const std::set< std::wstring > * pairclasses
const semanticDBsemdb

Friends

class dep_txala

Detailed Description

The class rule_expression stores the conditions for a labeler_rule.


Member Enumeration Documentation

Enumerator:
AND 
NOT 
SIDE 
LEMMA 
POS 
LABEL 
WORDCLASS 
TONTO 
SEMFILE 
SYNON 
ASYNON 
PAIRCLASS 

Constructor & Destructor Documentation

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 
)

Member Function Documentation

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]

Friends And Related Function Documentation

friend class dep_txala [friend]

Member Data Documentation

std::wstring freeling::rule_expression::node1 [protected]
std::wstring freeling::rule_expression::node2 [protected]
const std::set<std::wstring>* freeling::rule_expression::pairclasses [private]
std::set<std::wstring> freeling::rule_expression::valueList [protected]
const std::set<std::wstring>* freeling::rule_expression::wordclasses [private]

The documentation for this class was generated from the following file: