Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SentenceTuple Class Reference

This class represents a tuple of sentences. More...

#include <SentenceTuple.H>

List of all members.

Public Member Functions

 SentenceTuple ()
 SentenceTuple (const DIMTYPE &dim)
 Constructor.
 SentenceTuple (const Vector< ObservationSequence< Terminal > > in)
virtual ~SentenceTuple ()
 Destructor.
void setSentenceTuple (const Vector< ObservationSequence< Terminal > > in)
 sets the sentence tuple
vector< short > & lengths () const
 vector of lengths
DIMTYPE dimity () const
 Returns dimity.
void setDimity (const DIMTYPE &d)
void clear ()
 Clears the sentence tuple while preserving the dimensionality.
bool empty () const
 Checks whether the sentence tuple is empty.
SentenceTupleoperator= (const SentenceTuple &snt)
 assignment.
SentenceTupleoperator+= (const SentenceTuple &snt)
 concat.
istream & get (istream &in)
 input operator
void dump (ostream &out, vector< StringVocabulary * > vcb=vector< StringVocabulary * >()) const
ostream & put (ostream &out, vector< StringVocabulary * > vcb=vector< StringVocabulary * >()) const
SentenceTuplerotate ()
 Sentence 1D -> 2D -> ... -> 1D.
virtual void moveToFront (DIMTYPE d)
vector< hash_map< Terminal,
size_t > > 
countTerminals () const
 Counts of the terminals.
void generateTLinks (vector< TLink > &lexLinks, vector< DSV > &spans) const

Private Types

typedef Vector< ObservationSequence<
Terminal > > 
_base

Friends

istream & operator>> (istream &in, SentenceTuple &sntT)
 Input a sentence tuple from the in stream.
ostream & operator<< (ostream &out, const SentenceTuple &sntT)
 Output.


Detailed Description

This class represents a tuple of sentences.


Member Typedef Documentation

typedef Vector< ObservationSequence<Terminal> > SentenceTuple::_base [private]
 


Constructor & Destructor Documentation

SentenceTuple::SentenceTuple  ) 
 

Empty constructor. Constructors an empty sentence tuple consisting of no components.

SentenceTuple::SentenceTuple const DIMTYPE dim  ) 
 

Constructor.

SentenceTuple::SentenceTuple const Vector< ObservationSequence< Terminal > >  in  ) 
 

virtual SentenceTuple::~SentenceTuple  )  [inline, virtual]
 

Destructor.


Member Function Documentation

void SentenceTuple::clear  ) 
 

Clears the sentence tuple while preserving the dimensionality.

Here is the call graph for this function:

vector< hash_map< Terminal, size_t > > SentenceTuple::countTerminals  )  const
 

Counts of the terminals.

Here is the call graph for this function:

DIMTYPE SentenceTuple::dimity  )  const [inline]
 

Returns dimity.

void SentenceTuple::dump ostream &  out,
vector< StringVocabulary * >  vcb = vector< StringVocabulary * >()
const
 

Here is the call graph for this function:

bool SentenceTuple::empty  )  const
 

Checks whether the sentence tuple is empty.

Returns true if (i) the count field is 0, or (ii) dimensionality is 0, or (iii) all sentence lengths are 0 (EOSH is counted into the sentence length).

Here is the call graph for this function:

void SentenceTuple::generateTLinks vector< TLink > &  lexLinks,
vector< DSV > &  spans
const
 

Generates all the lex links (with their DSV) based on a SentenceTuple. The results are used for the generation of Scans. Please note that a D-dim NULLT is also generated.

Here is the call graph for this function:

istream & SentenceTuple::get istream &  in  ) 
 

input operator

Here is the call graph for this function:

vector< short > & SentenceTuple::lengths  )  const
 

vector of lengths

Here is the call graph for this function:

void SentenceTuple::moveToFront DIMTYPE  d  )  [virtual]
 

Move the d^th (0-indexed) component to be the 0^th. the indexes to other components are changed accordingly. For instance, [(a), (b), (c)] --> moveToFront(1)->[(b), (a), (c)]

Here is the call graph for this function:

SentenceTuple & SentenceTuple::operator+= const SentenceTuple snt  ) 
 

concat.

SentenceTuple& SentenceTuple::operator= const SentenceTuple snt  )  [inline]
 

assignment.

ostream & SentenceTuple::put ostream &  out,
vector< StringVocabulary * >  vcb = vector< StringVocabulary * >()
const
 

Here is the call graph for this function:

SentenceTuple & SentenceTuple::rotate  ) 
 

Sentence 1D -> 2D -> ... -> 1D.

Here is the call graph for this function:

void SentenceTuple::setDimity const DIMTYPE d  )  [inline]
 

Sets the dimity (number of sentences will be contained in this tuple).

void SentenceTuple::setSentenceTuple const Vector< ObservationSequence< Terminal > >  in  ) 
 

sets the sentence tuple


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const SentenceTuple sntT
[friend]
 

Output.

istream& operator>> istream &  in,
SentenceTuple sntT
[friend]
 

Input a sentence tuple from the in stream.


The documentation for this class was generated from the following files:
Generated on Thu Jul 7 23:41:34 2005 for Generalized Parsers (GenPar) by  doxygen 1.4.1