#include <include/ling_class/EST_Utterance.h>
Public Member Functions | |
Constructor and initialisation Functions | |
EST_Utterance () | |
default constructor | |
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 <parameter>n</parameter> More... | |
int | next_id () |
return the id of the next item More... | |
File i/o | |
EST_Features | f |
Utterance level features. More... | |
EST_Features | relations |
The list of named relations. More... | |
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 |
EST_Utterance & | operator= (const EST_Utterance &s) |
EST_Relation * | operator() (const EST_String &name) |
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_Relation * | relation (const char *name, int err_on_not_found=1) const |
get relation by name More... | |
EST_Item * | id (const EST_String &n) const |
return EST_Item whose id is <parameter>n</parameter>. More... | |
EST_Relation * | create_relation (const EST_String &relname) |
create a new relation called <parameter>n</parameter>. More... | |
void | remove_relation (const EST_String &relname) |
remove the relation called <parameter>n</parameter>. More... | |
void | sub_utterance (EST_Item *i) |
ostream & | operator<< (ostream &s, const EST_Utterance &u) |
A class that contains <link linkend="est-item">EST_Items</link> and <link linkend="est-relation">EST_Relations</link> between them. Used for holding interrelated linguistic structures.
Definition at line 54 of file EST_Utterance.h.
|
inline |
Definition at line 63 of file EST_Utterance.h.
|
inline |
Definition at line 64 of file EST_Utterance.h.
void EST_Utterance::init | ( | void | ) |
initialise utterance
Definition at line 73 of file EST_Utterance.cc.
void EST_Utterance::clear | ( | void | ) |
remove everything in utterance
Definition at line 86 of file EST_Utterance.cc.
void EST_Utterance::clear_relations | ( | ) |
clear the contents of the relations only
Definition at line 91 of file EST_Utterance.cc.
|
inline |
set the next id to be <parameter>n</parameter>
Definition at line 80 of file EST_Utterance.h.
int EST_Utterance::next_id | ( | ) |
return the id of the next item
Definition at line 79 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 450 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 472 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 512 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 534 of file EST_Utterance.cc.
EST_Utterance & EST_Utterance::operator= | ( | const EST_Utterance & | s | ) |
Definition at line 188 of file EST_Utterance.cc.
|
inline |
Definition at line 106 of file EST_Utterance.h.
void EST_Utterance::evaluate_all_features | ( | ) |
Evaluate all feature functions in utterance.
Definition at line 144 of file EST_Utterance.cc.
|
inline |
number of relations in this utterance
Definition at line 123 of file EST_Utterance.h.
bool EST_Utterance::relation_present | ( | const EST_String | name | ) | const |
returns true if utterance contains named relations. {\bf name} can be either a single string or a bracketed list of strings e.g. "(Word Phone Syl)".
Definition at line 171 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 {\bf name}.
Definition at line 180 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 160 of file EST_Utterance.cc.
EST_Item * EST_Utterance::id | ( | const EST_String & | n | ) | const |
return EST_Item whose id is <parameter>n</parameter>.
Definition at line 131 of file EST_Utterance.cc.
EST_Relation * EST_Utterance::create_relation | ( | const EST_String & | relname | ) |
create a new relation called <parameter>n</parameter>.
Definition at line 98 of file EST_Utterance.cc.
void EST_Utterance::remove_relation | ( | const EST_String & | relname | ) |
remove the relation called <parameter>n</parameter>.
Definition at line 152 of file EST_Utterance.cc.
void EST_Utterance::sub_utterance | ( | EST_Item * | i | ) |
Definition at line 230 of file EST_Utterance.cc.
|
friend |
Definition at line 194 of file EST_Utterance.cc.
EST_Features EST_Utterance::f |
EST_Features EST_Utterance::relations |
The list of named relations.
Definition at line 120 of file EST_Utterance.h.