The class relax_tagger implements a PoS tagger based on relaxation labelling algorithm. More...
#include <relax_tagger.h>
Public Member Functions | |
relax_tagger (const std::string &, int, double, double, bool, unsigned int) | |
Constructor, given the constraint file and config parameters. | |
void | analyze (std::list< sentence > &) |
analyze sentences with default options | |
std::list< sentence > | analyze (const std::list< sentence > &) |
analyze sentences and return analyzed copy (for java API) | |
Private Member Functions | |
bool | CheckCondition (const sentence &, sentence::const_iterator, int, const condition &, std::list< std::list< std::pair< int, int > > > &) |
check a condition of a RuleCG. | |
bool | CheckWordMatchCondition (const std::list< std::string > &, bool, int, sentence::const_iterator, std::list< std::pair< int, int > > &) |
check whether a word matches a simple list of terms. | |
bool | check_possible_matching (const std::string &, word::const_iterator, sentence::const_iterator) |
check whether a word matches one of all possible condition patterns | |
bool | check_match (const std::string &, const std::string &) const |
check a match of two literals, taking into account lemma, tag, wildcards, etc. | |
Private Attributes | |
relax | solver |
Generic solver instance. | |
constraint_grammar | c_gram |
PoS constraints. | |
RegEx | RE_user |
The class relax_tagger implements a PoS tagger based on relaxation labelling algorithm.
It does so using the generic solver implemented by class relax.
relax_tagger::relax_tagger | ( | const std::string & | , | |
int | , | |||
double | , | |||
double | , | |||
bool | , | |||
unsigned | int | |||
) |
Constructor, given the constraint file and config parameters.
std::list<sentence> relax_tagger::analyze | ( | const std::list< sentence > & | ) |
analyze sentences and return analyzed copy (for java API)
void relax_tagger::analyze | ( | std::list< sentence > & | ) | [virtual] |
analyze sentences with default options
Implements POS_tagger.
bool relax_tagger::check_match | ( | const std::string & | , | |
const std::string & | ||||
) | const [private] |
check a match of two literals, taking into account lemma, tag, wildcards, etc.
bool relax_tagger::check_possible_matching | ( | const std::string & | , | |
word::const_iterator | , | |||
sentence::const_iterator | ||||
) | [private] |
check whether a word matches one of all possible condition patterns
bool relax_tagger::CheckCondition | ( | const sentence & | , | |
sentence::const_iterator | , | |||
int | , | |||
const condition & | , | |||
std::list< std::list< std::pair< int, int > > > & | ||||
) | [private] |
check a condition of a RuleCG.
Add to the given constraint& solver-encoded constraint info for the condition
bool relax_tagger::CheckWordMatchCondition | ( | const std::list< std::string > & | , | |
bool | , | |||
int | , | |||
sentence::const_iterator | , | |||
std::list< std::pair< int, int > > & | ||||
) | [private] |
check whether a word matches a simple list of terms.
Return (via list<pair<int,int>>&) a solver-encoded term for the condition
constraint_grammar relax_tagger::c_gram [private] |
PoS constraints.
RegEx relax_tagger::RE_user [private] |
relax relax_tagger::solver [private] |
Generic solver instance.