Edinburgh Speech Tools  2.1-release
EST_Utterance Class Reference

#include <include/ling_class/EST_Utterance.h>

Collaboration diagram for EST_Utterance:

Public Member Functions

EST_Utteranceoperator= (const EST_Utterance &s)
 
EST_Relationoperator() (const EST_String &name)
 
Constructor and initialisation Functions
 EST_Utterance ()
 default constructor More...
 
 EST_Utterance (const EST_Utterance &u)
 
 ~EST_Utterance ()
 
Utility Functions
void init ()
 initialise utterance More...
 
void clear ()
 remove everything in utterance More...
 
void clear_relations ()
 clear the contents of the relations only More...
 
void set_highest_id (int n)
 set the next id to be n More...
 
int next_id ()
 return the id of the next item More...
 
File i/o
EST_read_status load (const EST_String &filename)
 
EST_read_status load (EST_TokenStream &ts)
 
EST_write_status save (const EST_String &filename, const EST_String &type="est_ascii") const
 
EST_write_status save (ostream &outf, const EST_String &type) const
 

Friends

ostream & operator<< (ostream &s, const EST_Utterance &u)
 
EST_Features f
 Utterance level features. More...
 
EST_Features relations
 The list of named relations. More...
 
void evaluate_all_features ()
 Evaluate all feature functions in utterance. More...
 
int num_relations () const
 number of relations in this utterance More...
 
bool relation_present (const EST_String name) const
 
bool relation_present (EST_StrList &names) const
 
EST_Relationrelation (const char *name, int err_on_not_found=1) const
 get relation by name More...
 
EST_Itemid (const EST_String &n) const
 return EST_Item whose id is n. More...
 
EST_Relationcreate_relation (const EST_String &relname)
 create a new relation called n. More...
 
void remove_relation (const EST_String &relname)
 remove the relation called n. More...
 
void sub_utterance (EST_Item *i)
 

Detailed Description

A class that contains EST_Item and EST_Relation between them. Used for holding interrelated linguistic structures.

Definition at line 53 of file EST_Utterance.h.

Constructor & Destructor Documentation

EST_Utterance::EST_Utterance ( )

default constructor

EST_Utterance::EST_Utterance ( const EST_Utterance u)
inline

Definition at line 62 of file EST_Utterance.h.

EST_Utterance::~EST_Utterance ( )
inline

Definition at line 63 of file EST_Utterance.h.

Member Function Documentation

void EST_Utterance::init ( void  )

initialise utterance

Definition at line 75 of file EST_Utterance.cc.

void EST_Utterance::clear ( void  )

remove everything in utterance

Definition at line 88 of file EST_Utterance.cc.

void EST_Utterance::clear_relations ( )

clear the contents of the relations only

Definition at line 93 of file EST_Utterance.cc.

void EST_Utterance::set_highest_id ( int  n)
inline

set the next id to be n

Definition at line 78 of file EST_Utterance.h.

int EST_Utterance::next_id ( )

return the id of the next item

Definition at line 81 of file EST_Utterance.cc.

EST_read_status EST_Utterance::load ( const EST_String filename)

load an utterance from an ascii file

Definition at line 452 of file EST_Utterance.cc.

EST_read_status EST_Utterance::load ( EST_TokenStream ts)

load an utterance from a already opened token stream

Definition at line 474 of file EST_Utterance.cc.

EST_write_status EST_Utterance::save ( const EST_String filename,
const EST_String type = "est_ascii" 
) const

save an utterance to an ascii file

Definition at line 524 of file EST_Utterance.cc.

EST_write_status EST_Utterance::save ( ostream &  outf,
const EST_String type 
) const

save an utterance to an ostream

Definition at line 546 of file EST_Utterance.cc.

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

Definition at line 190 of file EST_Utterance.cc.

EST_Relation* EST_Utterance::operator() ( const EST_String name)
inline

Definition at line 104 of file EST_Utterance.h.

void EST_Utterance::evaluate_all_features ( )

Evaluate all feature functions in utterance.

Definition at line 146 of file EST_Utterance.cc.

int EST_Utterance::num_relations ( ) const
inline

number of relations in this utterance

Definition at line 121 of file EST_Utterance.h.

bool EST_Utterance::relation_present ( const EST_String  name) const

returns true if utterance contains named relations. name** can be either a single string or a bracketed list of strings e.g. "(Word Phone Syl)".

Definition at line 173 of file EST_Utterance.cc.

bool EST_Utterance::relation_present ( EST_StrList names) const

returns true if utterance contains all the relations named in the list name.

Definition at line 182 of file EST_Utterance.cc.

EST_Relation * EST_Utterance::relation ( const char *  name,
int  err_on_not_found = 1 
) const

get relation by name

Definition at line 162 of file EST_Utterance.cc.

EST_Item * EST_Utterance::id ( const EST_String n) const

return EST_Item whose id is n.

Definition at line 133 of file EST_Utterance.cc.

EST_Relation * EST_Utterance::create_relation ( const EST_String relname)

create a new relation called n.

Definition at line 100 of file EST_Utterance.cc.

void EST_Utterance::remove_relation ( const EST_String relname)

remove the relation called n.

Definition at line 154 of file EST_Utterance.cc.

void EST_Utterance::sub_utterance ( EST_Item i)

Definition at line 232 of file EST_Utterance.cc.

Friends And Related Function Documentation

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

Definition at line 196 of file EST_Utterance.cc.

Member Data Documentation

EST_Features EST_Utterance::f

Utterance level features.

Utterance access

Definition at line 112 of file EST_Utterance.h.

EST_Features EST_Utterance::relations

The list of named relations.

Definition at line 118 of file EST_Utterance.h.


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