FreeLing  3.1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
freeling::fex_condition Class Reference

Class fex_condition stores a condition to be checked on the target. More...

#include <fex_rule.h>

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

List of all members.

Public Member Functions

 fex_condition ()
 fex_condition (const std::wstring &, const std::wstring &, const std::wstring &, const std::wstring &)
 constructor, given id, function, focus, and filename/regex
 fex_condition (const fex_condition &)
 Copy constructor.
fex_conditionoperator= (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
static std::map< std::wstring,
std::set< std::wstring > > 
set_files
 loaded set files (loaded once, may be used by several conditions in different rules)
static boost::mutex sem_set_files

Detailed Description

Class fex_condition stores a condition to be checked on the target.


Constructor & Destructor Documentation

freeling::fex_condition::fex_condition ( const std::wstring &  ,
const std::wstring &  ,
const std::wstring &  ,
const std::wstring &   
)

constructor, given id, function, focus, and filename/regex

Copy constructor.


Member Function Documentation

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.

check whether the condition is "true" (literally) and will match any words.

fex_condition& freeling::fex_condition::operator= ( const fex_condition )

assignment

print condition to stderr in the given tracelevel (debug purposes only)


Member Data Documentation

std::wstring freeling::fex_condition::cid [private]

condition id

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

regexp (if needed by function)

whether the function has a negation

boost::mutex freeling::fex_condition::sem_set_files [static, private]
std::map<std::wstring, std::set<std::wstring> > freeling::fex_condition::set_files [static, private]

loaded set files (loaded once, may be used by several conditions in different rules)

std::wstring freeling::fex_condition::split [private]

substring to use as a separator in splits

auxiliar regexs to parse rules


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