FreeLing
4.0
|
Class fex_condition stores a condition to be checked on the target. More...
#include <fex_rule.h>
Public Member Functions | |
fex_condition () | |
fex_condition (const std::wstring &, const std::wstring &, const std::wstring &, const std::wstring &, std::map< std::wstring, std::set< std::wstring > > &) | |
constructor, given id, function, focus, and filename/regex | |
fex_condition (const fex_condition &) | |
Copy constructor. | |
fex_condition & | operator= (const fex_condition &) |
assignment | |
bool | check (const word &, const tagset &, fex_status *) const |
evaluate whether a word meets the condition. | |
bool | is_true () const |
check whether the condition is "true" (literally) and will match any words. | |
std::wstring | get_match (int, fex_status *) const |
get i-th subexpression match of last RE application | |
void | trace (int) const |
print condition to stderr in the given tracelevel (debug purposes only) | |
Private Member Functions | |
std::list< std::wstring > | get_target (const word &, const tagset &) const |
Obtain the target(s) of a condition. | |
Private Attributes | |
std::wstring | cid |
condition id | |
std::wstring | function |
function to perform (check Regex, search a file, etc) | |
std::wstring | focus |
item on which perform the check (word, lemma, tag, any-tag, etc) | |
std::wstring | split |
substring to use as a separator in splits | |
std::wstring | literal |
literal to compare against in "is" operations. | |
std::set< std::wstring > * | fileset |
set file contents (if needed by function) | |
freeling::regexp | match_re |
regexp (if needed by function) | |
bool | negated |
whether the function has a negation | |
bool | cond_true |
remember if the rule is trivial | |
Static Private Attributes | |
static const freeling::regexp | split_re |
auxiliar regexs to parse rules |
Class fex_condition stores a condition to be checked on the target.
freeling::fex_condition::fex_condition | ( | const std::wstring & | , |
const std::wstring & | , | ||
const std::wstring & | , | ||
const std::wstring & | , | ||
std::map< std::wstring, std::set< std::wstring > > & | |||
) |
constructor, given id, function, focus, and filename/regex
freeling::fex_condition::fex_condition | ( | const fex_condition & | ) |
Copy constructor.
bool freeling::fex_condition::check | ( | const word & | , |
const tagset & | , | ||
fex_status * | |||
) | const |
evaluate whether a word meets the condition.
std::wstring freeling::fex_condition::get_match | ( | int | , |
fex_status * | |||
) | const |
get i-th subexpression match of last RE application
std::list<std::wstring> freeling::fex_condition::get_target | ( | const word & | , |
const tagset & | |||
) | const [private] |
Obtain the target(s) of a condition.
bool freeling::fex_condition::is_true | ( | ) | const |
check whether the condition is "true" (literally) and will match any words.
fex_condition& freeling::fex_condition::operator= | ( | const fex_condition & | ) |
assignment
void freeling::fex_condition::trace | ( | int | ) | const |
print condition to stderr in the given tracelevel (debug purposes only)
std::wstring freeling::fex_condition::cid [private] |
condition id
bool freeling::fex_condition::cond_true [private] |
remember if the rule is trivial
std::set<std::wstring>* freeling::fex_condition::fileset [private] |
set file contents (if needed by function)
std::wstring freeling::fex_condition::focus [private] |
item on which perform the check (word, lemma, tag, any-tag, etc)
std::wstring freeling::fex_condition::function [private] |
function to perform (check Regex, search a file, etc)
std::wstring freeling::fex_condition::literal [private] |
literal to compare against in "is" operations.
For "match" and set operations, it holds the string form of the parameter, just for debugging purposes
regexp (if needed by function)
bool freeling::fex_condition::negated [private] |
whether the function has a negation
std::wstring freeling::fex_condition::split [private] |
substring to use as a separator in splits
const freeling::regexp freeling::fex_condition::split_re [static, private] |
auxiliar regexs to parse rules