In file ../include/ling_class/EST_Item.h:

class EST_Item

A class for containing individual linguistic objects such as words or phones.

Public Methods

[more] Constructor Functions

[more] EST_Item ()
Default constructor
[more] EST_Item (const EST_Item &item)
Copy constructure only makes reference to contents
[more] EST_Item (EST_Relation* rel)
Includes reference to relation
[more] EST_Item (EST_Relation* rel, EST_Item* si)
Most common form of construction
[more] ~EST_Item ()
Deletes it and references to it in its contents

[more] Feature access functions.

[more]const float F (const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a float
[more]const float F (const EST_String &name, float def) const
return the value of the feature <parameter>name</parameter> cast as a float, returning <parameter>def</parameter> if not found
[more]const EST_String S (const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a EST_String
[more]const EST_String S (const EST_String &name, const EST_String &def) const
return the value of the feature <parameter>name</parameter> cast as a EST_String, returning <parameter>def</parameter> if not found
[more]const int I (const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a int
[more]const int I (const EST_String &name, int def) const
return the value of the feature <parameter>name</parameter> cast as a int returning <parameter>def</parameter> if not found
[more]EST_Features& A (const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a EST_Features
[more]EST_Features& A (const EST_String &name, EST_Features &def) const
return the value of the feature <parameter>name</parameter> cast as a EST_Features, returning <parameter>def</parameter> if not found

[more] Feature setting functions.

[more]void set (const EST_String &name, int ival)
set feature <parameter>name</parameter> to <parameter>val</parameter>
[more]void set (const EST_String &name, float fval)
set feature <parameter>name</parameter> to <parameter>val</parameter>
[more]void set (const EST_String &name, double fval)
set feature <parameter>name</parameter> to <parameter>val</parameter>
[more]void set (const EST_String &name, const EST_String &sval)
set feature <parameter>name</parameter> to <parameter>val</parameter>
[more]void set (const EST_String &name, const char* cval)
set feature <parameter>name</parameter> to <parameter>val</parameter>
[more]void set_function (const EST_String &name, const EST_String &funcname)
set feature <parameter>name</parameter> to <parameter>val</parameter>, a function registered in the feature function list.
[more]void set (const EST_String &name, EST_Features &f)
set feature <parameter>name</parameter> to <parameter>f</parameter>, a set of features, which is copied into the object
[more]void set_val (const EST_String &name, const EST_Val &sval)
set feature <parameter>name</parameter> to <parameter>f</parameter>, whose type is EST_Val

[more] Utility feature functions

[more]void f_remove (const EST_String &name)
remove feature <parameter>name</parameter>
[more]void evaluate_features ()
find all the attributes whose values are functions, and replace them with their evaluation.
[more]int f_present (const EST_String &name) const
TRUE if feature is present, FALSE otherwise

[more] Cross relational access

[more]EST_Item* as_relation (const char* relname) const
View item from another relation (const char *) method
[more]int in_relation (const EST_String &relname) const
TRUE if this item is in named relation
[more]EST_TKVL<EST_String, EST_Val> & relations ()
Access to the relation links
[more]const EST_String& relation_name () const
The relation name of this particular item
[more]EST_Relation* relation (void) const
The relation of this particular item
[more]int same_item (const EST_Item* li) const
True if li is the same item ignoring its relation viewpoint


Documentation

A class for containing individual linguistic objects such as words or phones.

These contain two types of infomation. This first is specific to the EST_Relation we are viewing this ling item from, the second part constists of a set of features. These features may be shared by instances of this ling item in different <link linkend="est-relation">EST_Relation</link> within the same <link linkend="est-utterance">EST_Utterances</link>

The shared part of an <link linkend="est-item">EST_Item</link> is represented by the class EST_Item_Content. It should not normally be accessed by the general users as reverse links from the contents to each of the EST_Items it is part of are held ensure the integrity of the structures. Changing these without maintain the appropriate links is unlikely to be stable.

We believe this structure is the most efficient for the most natural use we envisage. Traversal of the items ....

o Constructor Functions

o EST_Item()
Default constructor

o EST_Item(const EST_Item &item)
Copy constructure only makes reference to contents

o EST_Item(EST_Relation* rel)
Includes reference to relation

o EST_Item(EST_Relation* rel, EST_Item* si)
Most common form of construction

o ~EST_Item()
Deletes it and references to it in its contents

o Feature access functions.
These functions are wrap-around functions to the basic access functions in the EST_Features class. In all these functioms, if the optional argument <parameter>m} is set to 1, an error is thrown if the feature does not exist

oconst float F(const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a float

oconst float F(const EST_String &name, float def) const
return the value of the feature <parameter>name</parameter> cast as a float, returning <parameter>def</parameter> if not found

oconst EST_String S(const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a EST_String

oconst EST_String S(const EST_String &name, const EST_String &def) const
return the value of the feature <parameter>name</parameter> cast as a EST_String, returning <parameter>def</parameter> if not found

oconst int I(const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a int

oconst int I(const EST_String &name, int def) const
return the value of the feature <parameter>name</parameter> cast as a int returning <parameter>def</parameter> if not found

oEST_Features& A(const EST_String &name) const
return the value of the feature <parameter>name</parameter> cast as a EST_Features

oEST_Features& A(const EST_String &name, EST_Features &def) const
return the value of the feature <parameter>name</parameter> cast as a EST_Features, returning <parameter>def</parameter> if not found

o Feature setting functions.
A separate function is provided for each permissable value type

ovoid set(const EST_String &name, int ival)
set feature <parameter>name</parameter> to <parameter>val</parameter>

ovoid set(const EST_String &name, float fval)
set feature <parameter>name</parameter> to <parameter>val</parameter>

ovoid set(const EST_String &name, double fval)
set feature <parameter>name</parameter> to <parameter>val</parameter>

ovoid set(const EST_String &name, const EST_String &sval)
set feature <parameter>name</parameter> to <parameter>val</parameter>

ovoid set(const EST_String &name, const char* cval)
set feature <parameter>name</parameter> to <parameter>val</parameter>

ovoid set_function(const EST_String &name, const EST_String &funcname)
set feature <parameter>name</parameter> to <parameter>val</parameter>, a function registered in the feature function list.

ovoid set(const EST_String &name, EST_Features &f)
set feature <parameter>name</parameter> to <parameter>f</parameter>, a set of features, which is copied into the object

ovoid set_val(const EST_String &name, const EST_Val &sval)
set feature <parameter>name</parameter> to <parameter>f</parameter>, whose type is EST_Val

o Utility feature functions

ovoid f_remove(const EST_String &name)
remove feature <parameter>name</parameter>

ovoid evaluate_features()
find all the attributes whose values are functions, and replace them with their evaluation.

oint f_present(const EST_String &name) const
TRUE if feature is present, FALSE otherwise

o Cross relational access

oEST_Item* as_relation(const char* relname) const
View item from another relation (const char *) method

oint in_relation(const EST_String &relname) const
TRUE if this item is in named relation

oEST_TKVL<EST_String, EST_Val> & relations()
Access to the relation links

oconst EST_String& relation_name() const
The relation name of this particular item

oEST_Relation* relation(void) const
The relation of this particular item

oint same_item(const EST_Item* li) const
True if li is the same item ignoring its relation viewpoint


This class has no child classes.
Friends:
int same_item(const EST_Item *l1,const EST_Item *l2)
int move_item(EST_Item *from, EST_Item *to)
int merge_item(EST_Item *from, EST_Item *to)
int move_sub_tree(EST_Item *from, EST_Item *to)
int exchange_sub_trees(EST_Item *from,EST_Item *to)
ostream& operator << (ostream &s, const EST_Item &a)
bool operator !=(const EST_Item &a, const EST_Item &b)
bool operator ==(const EST_Item &a, const EST_Item &b)
class EST_Relation
class ling_class_init

Alphabetic index HTML hierarchy of classes or Java


This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk