|
FreeLing
4.0
|
Feature lexicon. More...
#include <fex_lexicon.h>
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 int > | known_codes |
Feature lexicon.
Stores feature codes and frequencies
constructor: empty lexicon
| freeling::fex_lexicon::fex_lexicon | ( | const std::wstring & | ) |
constructor: load file
| void freeling::fex_lexicon::add_occurrence | ( | const std::wstring & | ) |
add feature occurrence to lexicon
| void freeling::fex_lexicon::clear_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
| bool freeling::fex_lexicon::is_empty | ( | ) | const |
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
unsigned int freeling::fex_lexicon::freq_sum [private] |
std::set<unsigned int> freeling::fex_lexicon::known_codes [private] |
unsigned int freeling::fex_lexicon::next_code [private] |
1.7.6.1