FreeLing  4.0
Public Member Functions | Private Member Functions | Private Attributes
freeling::relax_tagger Class Reference

The class relax_tagger implements a PoS tagger based on relaxation labelling algorithm. More...

#include <relax_tagger.h>

Inheritance diagram for freeling::relax_tagger:
Inheritance graph
[legend]
Collaboration diagram for freeling::relax_tagger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 relax_tagger (const std::wstring &, int, double, double, bool, unsigned int)
 Constructor, given the constraint file and config parameters.
void annotate (sentence &) const
 analyze sentences with default options

Private Member Functions

bool CheckCondition (const sentence &, sentence::const_iterator, int, const condition &, std::list< std::list< std::pair< int, int > > > &) const
 check a condition of a RuleCG.
bool CheckWordMatchCondition (const std::list< std::wstring > &, bool, int, sentence::const_iterator, std::list< std::pair< int, int > > &) const
 check whether a word matches a simple list of terms.
bool check_possible_matching (const std::wstring &, word::const_iterator, sentence::const_iterator) const
 check whether a word matches one of all possible condition patterns
bool check_match (const std::wstring &, const std::wstring &) 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.
freeling::regexp RE_user

Detailed Description

The class relax_tagger implements a PoS tagger based on relaxation labelling algorithm.

It does so using the generic solver implemented by class relax.


Constructor & Destructor Documentation

freeling::relax_tagger::relax_tagger ( const std::wstring &  ,
int  ,
double  ,
double  ,
bool  ,
unsigned  int 
)

Constructor, given the constraint file and config parameters.


Member Function Documentation

void freeling::relax_tagger::annotate ( sentence ) const [virtual]

analyze sentences with default options

Implements freeling::POS_tagger.

bool freeling::relax_tagger::check_match ( const std::wstring &  ,
const std::wstring &   
) const [private]

check a match of two literals, taking into account lemma, tag, wildcards, etc.

bool freeling::relax_tagger::check_possible_matching ( const std::wstring &  ,
word::const_iterator  ,
sentence::const_iterator   
) const [private]

check whether a word matches one of all possible condition patterns

bool freeling::relax_tagger::CheckCondition ( const sentence ,
sentence::const_iterator  ,
int  ,
const condition ,
std::list< std::list< std::pair< int, int > > > &   
) const [private]

check a condition of a RuleCG.

Add to the given constraint& solver-encoded constraint info for the condition

bool freeling::relax_tagger::CheckWordMatchCondition ( const std::list< std::wstring > &  ,
bool  ,
int  ,
sentence::const_iterator  ,
std::list< std::pair< int, int > > &   
) const [private]

check whether a word matches a simple list of terms.

Return (via list<pair<int,int>>&) a solver-encoded term for the condition


Member Data Documentation

PoS constraints.

Generic solver instance.


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