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

Class locutions recognizes multiwords belonging to a list obtained from a configuration file. More...

#include <locutions.h>

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

List of all members.

Public Member Functions

 locutions (const std::wstring &)
 Constructor.
 ~locutions ()
 Destructor.
void add_locution (const std::wstring &)
 Add a locution rule to the multiword recognizer.

Private Member Functions

void check (const std::wstring, std::set< std::wstring > &, bool &, bool &, locutions_status *) const
int ComputeToken (int, sentence::iterator &, sentence &) const
 Compute the right token code for word j from given state.
void ResetActions (locutions_status *) const
 Reset current multiword acumulator.
void StateActions (int, int, int, sentence::const_iterator, locutions_status *) const
 Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, when reaching a state, update accumulated multiword.
void SetMultiwordAnalysis (sentence::iterator, int, const locutions_status *) const
 Set the appropriate lemma and tag for the new multiword.
bool ValidMultiWord (const word &, locutions_status *pst=NULL) const
 Perform last minute validation before effectively building multiword.

Private Attributes

std::map< std::wstring,
std::wstring > 
locut
 store multiword list
std::set< std::wstring > prefixes
 store multiword prefixes

Detailed Description

Class locutions recognizes multiwords belonging to a list obtained from a configuration file.


Constructor & Destructor Documentation

freeling::locutions::locutions ( const std::wstring &  locFile)

Destructor.


Member Function Documentation

void freeling::locutions::add_locution ( const std::wstring &  line)

Add a locution rule to the multiword recognizer.

References locut, and prefixes.

Referenced by locutions().

void freeling::locutions::check ( const std::wstring  ,
std::set< std::wstring > &  ,
bool ,
bool ,
locutions_status  
) const [private]
int freeling::locutions::ComputeToken ( int  state,
sentence::iterator &  j,
sentence se 
) const [private, virtual]
void freeling::locutions::ResetActions ( locutions_status st) const [private, virtual]
void freeling::locutions::SetMultiwordAnalysis ( sentence::iterator  i,
int  fstate,
const locutions_status st 
) const [private, virtual]

Set the appropriate lemma and tag for the new multiword.

Implements freeling::automat< locutions_status >.

References freeling::locutions_status::mw_ambiguous, freeling::locutions_status::mw_analysis, and TRACE.

void freeling::locutions::StateActions ( int  origin,
int  state,
int  token,
sentence::const_iterator  j,
locutions_status st 
) const [private, virtual]

Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, when reaching a state, update accumulated multiword.

Implements freeling::automat< locutions_status >.

References freeling::locutions_status::longest_mw, and TRACE.

bool freeling::locutions::ValidMultiWord ( const word w,
locutions_status pst = NULL 
) const [private, virtual]

Member Data Documentation

std::map<std::wstring,std::wstring> freeling::locutions::locut [private]

store multiword list

Referenced by add_locution(), check(), and ValidMultiWord().

std::set<std::wstring> freeling::locutions::prefixes [private]

store multiword prefixes

Referenced by add_locution(), and check().


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