Loading...
Searching...
No Matches
EST_Utterance Class Reference

`#include <include/ling_class/EST_Utterance.h>`

Collaboration diagram for EST_Utterance:
[legend]

## Public Member Functions

Constructor and initialisation Functions
| EST_Utterance ()
| default constructor
| EST_Utterance (const EST_Utterance &u)
Utility Functions
void | init ()
| initialise utterance
void | clear ()
| remove everything in utterance
void | clear_relations ()
| clear the contents of the relations only
void | set_highest_id (int n)
| set the next id to be <parameter>n</parameter>
int | next_id ()
| return the id of the next item

## File i/o

EST_Features | f
| Utterance level features.
EST_Features | relations
| The list of named relations.
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.
int | num_relations () const
| number of relations in this utterance
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
EST_Item * | id (const EST_String &n) const
| return EST_Item whose id is <parameter>n</parameter>.
EST_Relation * | create_relation (const EST_String &relname)
| create a new relation called <parameter>n</parameter>.
void | remove_relation (const EST_String &relname)
| remove the relation called <parameter>n</parameter>.
void | sub_utterance (EST_Item *i)
ostream & | operator<< (ostream &s, const EST_Utterance &u)

## Detailed Description

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.

## Constructor & Destructor Documentation

## EST_Utterance()

EST_Utterance::EST_Utterance | ( | const EST_Utterance & | u | ) |

inline

Definition at line 63 of file EST_Utterance.h.

## ~EST_Utterance()

EST_Utterance::~EST_Utterance | ( |  | ) |

inline

Definition at line 64 of file EST_Utterance.h.

## Member Function Documentation

## init()

void EST_Utterance::init | ( |  | ) |

initialise utterance

Definition at line 73 of file EST_Utterance.cc.

## clear()

void EST_Utterance::clear | ( |  | ) |

remove everything in utterance

Definition at line 86 of file EST_Utterance.cc.

## clear_relations()

void EST_Utterance::clear_relations | ( |  | ) |

clear the contents of the relations only

Definition at line 91 of file EST_Utterance.cc.

## set_highest_id()

void EST_Utterance::set_highest_id | ( | int | n | ) |

inline

set the next id to be <parameter>n</parameter>

Definition at line 80 of file EST_Utterance.h.

## next_id()

int EST_Utterance::next_id | ( |  | ) |

return the id of the next item

Definition at line 79 of file EST_Utterance.cc.

## load() [1/2]

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.

## load() [2/2]

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.

## save() [1/2]

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.

## save() [2/2]

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.

## operator=()

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

Definition at line 188 of file EST_Utterance.cc.

## operator()()

EST_Relation * EST_Utterance::operator() | ( | const EST_String & | name | ) |

inline

Definition at line 106 of file EST_Utterance.h.

## evaluate_all_features()

void EST_Utterance::evaluate_all_features | ( |  | ) |

Evaluate all feature functions in utterance.

Definition at line 144 of file EST_Utterance.cc.

## num_relations()

int EST_Utterance::num_relations | ( |  | ) | const

inline

number of relations in this utterance

Definition at line 123 of file EST_Utterance.h.

## relation_present() [1/2]

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.

## relation_present() [2/2]

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.

## relation()

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.

## id()

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.

## create_relation()

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.

## remove_relation()

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.

## sub_utterance()

void EST_Utterance::sub_utterance | ( | EST_Item * | i | ) |

Definition at line 230 of file EST_Utterance.cc.

## Friends And Related Symbol Documentation

## operator<<

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

friend

Definition at line 194 of file EST_Utterance.cc.

## Member Data Documentation

## f

EST_Features EST_Utterance::f

Utterance level features.

Utterance access

Definition at line 114 of file EST_Utterance.h.

## relations

EST_Features EST_Utterance::relations

The list of named relations.

Definition at line 120 of file EST_Utterance.h.

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

- include/ling_class/EST_Utterance.h
- ling_class/EST_Utterance.cc