#include <include/ling_class/EST_Utterance.h>
Public Member Functions | |
EST_Utterance & | operator= (const EST_Utterance &s) |
EST_Relation * | operator() (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_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 n . More... | |
EST_Relation * | create_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) |
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.
EST_Utterance::EST_Utterance | ( | ) |
default constructor
|
inline |
Definition at line 62 of file EST_Utterance.h.
|
inline |
Definition at line 63 of file EST_Utterance.h.
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.
|
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.
|
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.
|
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.
|
friend |
Definition at line 196 of file EST_Utterance.cc.
EST_Features EST_Utterance::f |
EST_Features EST_Utterance::relations |
The list of named relations.
Definition at line 118 of file EST_Utterance.h.