|
FreeLing
4.0
|
Class fex_rule stores a feature extraction rule. More...
#include <fex_rule.h>

Public Member Functions | |
| fex_rule (const std::wstring &, const std::wstring &, const std::wstring &, int, const std::list< fex_condition > &, const std::map< std::wstring, const feature_function * > &) | |
| Constructor, given id, pattern, rang, and condition:(focus, function, param) | |
| fex_rule (const fex_rule &) | |
| Copy constructor. | |
| fex_rule & | operator= (const fex_rule &) |
| assignment | |
| std::wstring | get_id () const |
| void | precompute (const sentence &, int, const tagset &) const |
| check whether a word matches the rule, precompute the feature, and store it. | |
| void | extract (const sentence &, int, int, const tagset &, std::list< std::wstring > &) const |
| Use precomputed features to extract actual features for word "i" as seen form word "anch". | |
| int | get_left () const |
| get left limit of range | |
| int | get_right () const |
| get right limit of range | |
| void | trace (int) const |
| print rule to stderr in the given tracelevel (debug purposes only) | |
Static Public Member Functions | |
| static bool | check_conds (const std::list< fex_condition > &, int, const word &, const tagset &, fex_status *) |
| check a list of conditions with and/or on a word. | |
Private Member Functions | |
| void | pattern_instance (const sentence &, int, const tagset &, std::list< std::wstring > &) const |
| replace marked chunks in a rule pattern (e.g. | |
| void | get_replacements (const std::wstring &, const word &, const tagset &, std::list< std::wstring > &) const |
Private Attributes | |
| std::wstring | rid |
| rule id | |
| std::wstring | pattern |
| rule pattern to build feature | |
| int | left |
| range around target where rule should be applied | |
| int | right |
| std::list< fex_condition > | conds |
| additional condition to be met by the target. | |
| int | operation |
| whether conditions should be joined with AND or OR | |
| const std::map< std::wstring, const feature_function * > & | feat_functs |
Static Private Attributes | |
| static const freeling::regexp | rulepat |
| auxiliar regexs to parse rules | |
| static const freeling::regexp | rulepat_anch |
| static const freeling::regexp | subexpr |
| static const freeling::regexp | featfun |
Class fex_rule stores a feature extraction rule.
| freeling::fex_rule::fex_rule | ( | const std::wstring & | , |
| const std::wstring & | , | ||
| const std::wstring & | , | ||
| int | , | ||
| const std::list< fex_condition > & | , | ||
| const std::map< std::wstring, const feature_function * > & | |||
| ) |
Constructor, given id, pattern, rang, and condition:(focus, function, param)
| freeling::fex_rule::fex_rule | ( | const fex_rule & | ) |
Copy constructor.
| static bool freeling::fex_rule::check_conds | ( | const std::list< fex_condition > & | , |
| int | , | ||
| const word & | , | ||
| const tagset & | , | ||
| fex_status * | |||
| ) | [static] |
check a list of conditions with and/or on a word.
| void freeling::fex_rule::extract | ( | const sentence & | , |
| int | , | ||
| int | , | ||
| const tagset & | , | ||
| std::list< std::wstring > & | |||
| ) | const |
Use precomputed features to extract actual features for word "i" as seen form word "anch".
| std::wstring freeling::fex_rule::get_id | ( | ) | const |
| int freeling::fex_rule::get_left | ( | ) | const |
get left limit of range
| void freeling::fex_rule::get_replacements | ( | const std::wstring & | , |
| const word & | , | ||
| const tagset & | , | ||
| std::list< std::wstring > & | |||
| ) | const [private] |
| int freeling::fex_rule::get_right | ( | ) | const |
get right limit of range
| void freeling::fex_rule::pattern_instance | ( | const sentence & | , |
| int | , | ||
| const tagset & | , | ||
| std::list< std::wstring > & | |||
| ) | const [private] |
replace marked chunks in a rule pattern (e.g.
: $t(0), $l(-1),...) with appropriate instance for given word
| void freeling::fex_rule::precompute | ( | const sentence & | , |
| int | , | ||
| const tagset & | |||
| ) | const |
check whether a word matches the rule, precompute the feature, and store it.
| void freeling::fex_rule::trace | ( | int | ) | const |
print rule to stderr in the given tracelevel (debug purposes only)
std::list<fex_condition> freeling::fex_rule::conds [private] |
additional condition to be met by the target.
const std::map<std::wstring,const feature_function*>& freeling::fex_rule::feat_functs [private] |
const freeling::regexp freeling::fex_rule::featfun [static, private] |
int freeling::fex_rule::left [private] |
range around target where rule should be applied
int freeling::fex_rule::operation [private] |
whether conditions should be joined with AND or OR
std::wstring freeling::fex_rule::pattern [private] |
rule pattern to build feature
std::wstring freeling::fex_rule::rid [private] |
rule id
int freeling::fex_rule::right [private] |
const freeling::regexp freeling::fex_rule::rulepat [static, private] |
auxiliar regexs to parse rules
const freeling::regexp freeling::fex_rule::rulepat_anch [static, private] |
const freeling::regexp freeling::fex_rule::subexpr [static, private] |
1.7.6.1