#include <context.h>
Public Member Functions | |
| PartOfContext (string_index_t lemma, tag_index_t tag, bool narrow=false) | |
| Constructor needs to know lemma and morphologic tag. | |
| bool | operator== (const PartOfContext &rhs) const |
| Two contexts are equal if they are binded to the same lemma and tag. | |
| context_frequency_t | frequency (void) const |
| void | inc (void) |
| Increment frequency counter. | |
| bool | is_part_of_narrow (void) const |
| bool | is_part_of_wide (void) const |
| string_index_t | lemma (void) const |
| tag_index_t | tag (void) const |
Private Attributes | |
| context_frequency_t | _frequency |
| Word frequency. | |
| TaggedLemma | _tagged_lemma |
| Word lemma and tag altogether. | |
Static Private Attributes | |
| static const context_frequency_t | _max_frequency = std::numeric_limits<context_frequency_t>::max() >> 1 |
| static const context_frequency_t | _narrow_flag_bitmask = ~PartOfContext::_max_frequency |
It holds data for any word founded within context (in general): 1. word lemma 2. word morphologic tag 3. word frequency
| ace::PartOfContext::PartOfContext | ( | string_index_t | lemma, | |
| tag_index_t | tag, | |||
| bool | narrow = false | |||
| ) | [inline] |
| bool ace::PartOfContext::operator== | ( | const PartOfContext & | rhs | ) | const [inline] |
Two contexts are equal if they are binded to the same lemma and tag.
| rhs | Part of context to compare. |
| context_frequency_t ace::PartOfContext::frequency | ( | void | ) | const [inline] |
| void ace::PartOfContext::inc | ( | void | ) |
Increment frequency counter.
| context_part_frequency_index_overflow | In case of frequency counter overflow. |
| bool ace::PartOfContext::is_part_of_narrow | ( | void | ) | const [inline] |
| bool ace::PartOfContext::is_part_of_wide | ( | void | ) | const [inline] |
| string_index_t ace::PartOfContext::lemma | ( | void | ) | const [inline] |
| tag_index_t ace::PartOfContext::tag | ( | void | ) | const [inline] |
const context_frequency_t ace::PartOfContext::_max_frequency = std::numeric_limits<context_frequency_t>::max() >> 1 [static, private] |
const context_frequency_t ace::PartOfContext::_narrow_flag_bitmask = ~PartOfContext::_max_frequency [static, private] |
Word frequency.
TaggedLemma ace::PartOfContext::_tagged_lemma [private] |
Word lemma and tag altogether.
1.5.6