| Tanl Linguistic Pipeline |
Represents the information of a trie node. More...
#include <SuffixGuesser.h>
Public Member Functions | |
| Counts () | |
| No parameter constructor. | |
| Counts (Counts *cpy) | |
| Copy constructor. | |
| void | serialize (std::ostream &out) |
| Serializes a Counts object. | |
| void | serialize (std::istream &in) |
| De-Serializes a Counts object. | |
| Counts * | update (TagID tag, int count) |
| This method updates the counting information of a certain tag. | |
Public Attributes | |
| int | count |
| Amount of suffix repetitions in the corpus. | |
| TagCounts | tagCounts |
| Map containing the amount of times the suffix is tagged with a certain tag ID. | |
Represents the information of a trie node.
This struct contains the necessary information about a suffix. This information is divided into the amount of times the suffix is present in the corpus, and for each tag ID it stores a counter to know how many times the suffix has been tagged using that tag ID.
| Tanl::POS::Counts::Counts | ( | ) | [inline] |
No parameter constructor.
It initializes the count field to 0 and has an empty body.
| Tanl::POS::Counts::Counts | ( | Counts * | cpy | ) | [inline] |
| void Tanl::POS::Counts::serialize | ( | std::istream & | in | ) |
De-Serializes a Counts object.
| in | The stream from which the object will be read |
| void Tanl::POS::Counts::serialize | ( | std::ostream & | out | ) |
Serializes a Counts object.
| out | The stream wherein the object will be written |
Referenced by Tanl::POS::TrieNode::serialize().
| Counts * Tanl::POS::Counts::update | ( | TagID | tag, | |
| int | count | |||
| ) |
This method updates the counting information of a certain tag.
This is done by adding the specified count to the corresponding tag in the map. If the tag does not belong to the map a new pair is created and set to count.
| [in] | tag | Tag Id to be updated |
| [in] | count | Amount to be added to the tag in this suffix |
References tagCounts.