Edinburgh Speech Tools  2.1-release
EST_Relation Class Reference

#include <include/ling_class/EST_Relation.h>

Collaboration diagram for EST_Relation:

Public Types

typedef EST_Relation_Iterator Iterator
 

Public Member Functions

 EST_Relation ()
 
 EST_Relation (const EST_String &name)
 
 EST_Relation (const EST_Relation &r)
 
 ~EST_Relation ()
 
void evaluate_item_features ()
 
void clear ()
 
EST_Utteranceutt (void)
 
void set_utt (EST_Utterance *u)
 
const EST_Stringname () const
 
EST_Itemhead () const
 
EST_Itemroot () const
 
EST_Itemtail () const
 
EST_Itemfirst () const
 
EST_Itemfirst_leaf () const
 
EST_Itemlast () const
 
EST_Itemlast_leaf () const
 
int length () const
 
int empty () const
 
void remove_item (EST_Item *item)
 
void remove_item_feature (const EST_String &name)
 
EST_read_status load (const EST_String &filename, const EST_String &type="esps")
 
EST_read_status load (EST_TokenStream &ts, const EST_TVector< EST_Item_Content * > &contents)
 
EST_read_status load (const EST_String &filename, EST_TokenStream &ts, const EST_String &type)
 
EST_write_status save (const EST_String &filename, bool evaluate_ff=false) const
 
EST_write_status save (const EST_String &filename, const EST_String &type, bool evaluate_ff=false) const
 
EST_write_status save (ostream &outf, EST_TKVL< void *, int > contents) const
 
EST_write_status save (ostream &outf, const EST_String &type, bool evaluate_ff) const
 
EST_Relationoperator= (const EST_Relation &s)
 
EST_Itemappend (EST_Item *si)
 
EST_Itemappend ()
 
EST_Itemprepend (EST_Item *si)
 
EST_Itemprepend ()
 

Public Attributes

EST_Features f
 

Friends

class EST_Item
 
ostream & operator<< (ostream &s, const EST_Relation &u)
 

Detailed Description

Relations are a container class for EST_Item. Three types of relation structure are supported:

  • Linear lists
  • Trees
  • Multi-linear structures as used in autosegmental phonology etc

Definition at line 65 of file EST_Relation.h.

Member Typedef Documentation

Iteration

Definition at line 188 of file EST_Relation.h.

Constructor & Destructor Documentation

EST_Relation::EST_Relation ( )

default constructor

Definition at line 59 of file EST_Relation.cc.

EST_Relation::EST_Relation ( const EST_String name)

Constructor which sets name of relation

Definition at line 51 of file EST_Relation.cc.

EST_Relation::EST_Relation ( const EST_Relation r)
inline

Constructor which copies relation r

Definition at line 96 of file EST_Relation.h.

EST_Relation::~EST_Relation ( )

default destructor

Definition at line 144 of file EST_Relation.cc.

Member Function Documentation

void EST_Relation::evaluate_item_features ( )

Evaluate the relation's feature functions Evaluate the feature functions of all the items in the relation

Definition at line 161 of file EST_Relation.cc.

void EST_Relation::clear ( void  )

Clear the relation of items

Definition at line 167 of file EST_Relation.cc.

EST_Utterance* EST_Relation::utt ( void  )
inline

Return the EST_Utterance to which this relation belongs

Definition at line 112 of file EST_Relation.h.

void EST_Relation::set_utt ( EST_Utterance u)
inline

Set the EST_Utterance to which this relation belongs

Definition at line 115 of file EST_Relation.h.

const EST_String& EST_Relation::name ( void  ) const
inline

Return the name of the relation

Definition at line 118 of file EST_Relation.h.

EST_Item* EST_Relation::head ( ) const
inline

Return the head (first) item of the relation

Definition at line 121 of file EST_Relation.h.

EST_Item* EST_Relation::root ( ) const
inline

Return the root item of the relation

Definition at line 124 of file EST_Relation.h.

EST_Item* EST_Relation::tail ( ) const
inline

Return the tail (last) item of the relation

Definition at line 127 of file EST_Relation.h.

EST_Item* EST_Relation::first ( ) const
inline

Definition at line 130 of file EST_Relation.h.

EST_Item * EST_Relation::first_leaf ( ) const

Definition at line 663 of file EST_Relation.cc.

EST_Item* EST_Relation::last ( ) const
inline

Definition at line 132 of file EST_Relation.h.

EST_Item * EST_Relation::last_leaf ( ) const

Definition at line 668 of file EST_Relation.cc.

int EST_Relation::length ( void  ) const

Return the tail (last) item of the relation number of items in this relation

Definition at line 149 of file EST_Relation.cc.

int EST_Relation::empty ( ) const
inline

return true if relation does not contain any items

Definition at line 143 of file EST_Relation.h.

void EST_Relation::remove_item ( EST_Item item)

remove EST_Item item from relation

Definition at line 179 of file EST_Relation.cc.

void EST_Relation::remove_item_feature ( const EST_String name)

remove all occurrences of feature name from relation's items

Definition at line 188 of file EST_Relation.cc.

EST_read_status EST_Relation::load ( const EST_String filename,
const EST_String type = "esps" 
)

Load relation from file

Definition at line 633 of file EST_Relation.cc.

EST_read_status EST_Relation::load ( EST_TokenStream ts,
const EST_TVector< EST_Item_Content * > &  contents 
)

Load relation from already open tokenstream Load relation from already open tokenstream

Definition at line 320 of file EST_Relation.cc.

EST_read_status EST_Relation::load ( const EST_String filename,
EST_TokenStream ts,
const EST_String type 
)

Load relation from already open tokenstream

Definition at line 609 of file EST_Relation.cc.

EST_write_status EST_Relation::save ( const EST_String filename,
bool  evaluate_ff = false 
) const

Save relation to file

Definition at line 238 of file EST_Relation.cc.

EST_write_status EST_Relation::save ( const EST_String filename,
const EST_String type,
bool  evaluate_ff = false 
) const

Save relation to file, evaluating all feature functions before hand

Definition at line 223 of file EST_Relation.cc.

EST_write_status EST_Relation::save ( ostream &  outf,
EST_TKVL< void *, int contents 
) const

Save relation from already open ostream

Definition at line 244 of file EST_Relation.cc.

EST_write_status EST_Relation::save ( ostream &  outf,
const EST_String type,
bool  evaluate_ff 
) const

Save relation from already open ostream

Definition at line 208 of file EST_Relation.cc.

EST_Relation & EST_Relation::operator= ( const EST_Relation s)

Definition at line 688 of file EST_Relation.cc.

EST_Item * EST_Relation::append ( EST_Item si)

Definition at line 88 of file EST_Relation.cc.

EST_Item * EST_Relation::append ( )

Definition at line 113 of file EST_Relation.cc.

EST_Item * EST_Relation::prepend ( EST_Item si)

Definition at line 123 of file EST_Relation.cc.

EST_Item * EST_Relation::prepend ( )

Definition at line 118 of file EST_Relation.cc.

Friends And Related Function Documentation

friend class EST_Item
friend

Definition at line 198 of file EST_Relation.h.

ostream& operator<< ( ostream &  s,
const EST_Relation u 
)
friend

Definition at line 694 of file EST_Relation.cc.

Member Data Documentation

EST_Features EST_Relation::f

Features which belong to the relation rather than its items

Definition at line 101 of file EST_Relation.h.


The documentation for this class was generated from the following files: