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

Feature lexicon. More...

#include <fex_lexicon.h>

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

List of all members.

Public Member Functions

 fex_lexicon ()
 constructor: empty lexicon
 fex_lexicon (const std::wstring &)
 constructor: load file
void clear_lexicon ()
 empty lexicon
void add_occurrence (const std::wstring &)
 add feature occurrence to lexicon
void save_lexicon (const std::wstring &, double) const
 save lexicon to a file, filtering features with low occurrence rate
unsigned int get_code (const std::wstring &) const
 consult: get feature code
unsigned int get_freq (const std::wstring &) const
 consult: get feature frequency
bool contains_code (unsigned int) const
 Find out whether the lexicon contains the given feature code.
bool is_empty () const
 Find out whether the lexicon is loaded and full.

Private Attributes

unsigned int freq_sum
unsigned int next_code
std::set< unsigned intknown_codes

Detailed Description

Feature lexicon.

Stores feature codes and frequencies


Constructor & Destructor Documentation

constructor: empty lexicon

freeling::fex_lexicon::fex_lexicon ( const std::wstring &  )

constructor: load file


Member Function Documentation

void freeling::fex_lexicon::add_occurrence ( const std::wstring &  )

add feature occurrence to lexicon

empty lexicon

bool freeling::fex_lexicon::contains_code ( unsigned  int) const

Find out whether the lexicon contains the given feature code.

unsigned int freeling::fex_lexicon::get_code ( const std::wstring &  ) const

consult: get feature code

unsigned int freeling::fex_lexicon::get_freq ( const std::wstring &  ) const

consult: get feature frequency

Find out whether the lexicon is loaded and full.

void freeling::fex_lexicon::save_lexicon ( const std::wstring &  ,
double   
) const

save lexicon to a file, filtering features with low occurrence rate


Member Data Documentation

std::set<unsigned int> freeling::fex_lexicon::known_codes [private]

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