Tanl Linguistic Pipeline

Tanl::POS::Counts Struct Reference

Represents the information of a trie node. More...

#include <SuffixGuesser.h>

List of all members.

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.
Countsupdate (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.

Detailed Description

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.


Constructor & Destructor Documentation

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]

Copy constructor.

Creates a copy of the specified Counts object.

Parameters:
cpy Counts object to be copied from.

References tagCounts.


Member Function Documentation

void Tanl::POS::Counts::serialize ( std::istream &  in  ) 

De-Serializes a Counts object.

Parameters:
in The stream from which the object will be read
void Tanl::POS::Counts::serialize ( std::ostream &  out  ) 

Serializes a Counts object.

Parameters:
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.

Parameters:
[in] tag Tag Id to be updated
[in] count Amount to be added to the tag in this suffix
Returns:
A pointer to the updated Counts structure

References tagCounts.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.