FreeLing
4.0
|
Class compounds implements a compound checker. More...
#include <compounds.h>
Classes | |
class | pattern |
Auxiliary class to store a pattern. More... | |
Public Member Functions | |
compounds (const std::wstring &, const dictionary &) | |
Create a suffixed words analyzer. | |
~compounds () | |
Destroy a suffixed words analyzer. | |
bool | check_compound (word &) const |
Check whether a word is a compound. Add analysis if it is. | |
Private Attributes | |
bool | unknown_only |
whether only unknown words (vs all words) are checked for compounds | |
std::list< pattern > | patterns |
list of valid compound patterns (e.g. | |
foma_FSM * | fsm |
FSM to check for compounds. | |
const dictionary & | dic |
Class compounds implements a compound checker.
freeling::compounds::compounds | ( | const std::wstring & | , |
const dictionary & | |||
) |
Create a suffixed words analyzer.
Constructor.
References freeling::config_file::add_section(), freeling::config_file::close(), dic, freeling::dictionary::dump_dictionary(), ERROR_CRASH, fsm, freeling::config_file::get_content_line(), freeling::config_file::get_section(), int2wstring, list2wstring, freeling::config_file::open(), patterns, TRACE, unknown_only, WARNING, and wstring2list.
bool freeling::compounds::check_compound | ( | word & | w | ) | const |
Check whether a word is a compound. Add analysis if it is.
Check whether a word is a compound.
Add analysis if it is
References freeling::word::add_analysis(), freeling::dictionary::annotate_word(), dic, fsm, freeling::word::get_lc_form(), freeling::word::get_n_analysis(), freeling::foma_FSM::get_similar_words(), int2wstring, patterns, freeling::word::set_found_in_dict(), TRACE, unknown_only, and wstring2list.
const dictionary& freeling::compounds::dic [private] |
Referenced by check_compound(), and compounds().
foma_FSM* freeling::compounds::fsm [private] |
FSM to check for compounds.
Referenced by check_compound(), compounds(), and ~compounds().
std::list<pattern > freeling::compounds::patterns [private] |
list of valid compound patterns (e.g.
NC_NC, NC_SP_NC, etc), with head position for each.
Referenced by check_compound(), and compounds().
bool freeling::compounds::unknown_only [private] |
whether only unknown words (vs all words) are checked for compounds
Referenced by check_compound(), and compounds().