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

  | Constructor Functions
  | EST_Item () Default constructor
  | EST_Item (const EST_Item &item) Copy constructure only makes reference to contents
  | EST_Item (EST_Relation* rel) Includes reference to relation
  | EST_Item (EST_Relation* rel, EST_Item* si) Most common form of construction
  | ~EST_Item () Deletes it and references to it in its contents
  | Feature access functions.
  const float | F (const EST_String &name) const return the value of the feature <parameter>name</parameter> cast as a float
  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
  const EST_String | S (const EST_String &name) const return the value of the feature <parameter>name</parameter> cast as a EST_String
  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
  const int | I (const EST_String &name) const return the value of the feature <parameter>name</parameter> cast as a int
  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
  EST_Features& | A (const EST_String &name) const return the value of the feature <parameter>name</parameter> cast as a EST_Features
  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
  | Feature setting functions.
  void | set (const EST_String &name, int ival) set feature <parameter>name</parameter> to <parameter>val</parameter>
  void | set (const EST_String &name, float fval) set feature <parameter>name</parameter> to <parameter>val</parameter>
  void | set (const EST_String &name, double fval) set feature <parameter>name</parameter> to <parameter>val</parameter>
  void | set (const EST_String &name, const EST_String &sval) set feature <parameter>name</parameter> to <parameter>val</parameter>
  void | set (const EST_String &name, const char* cval) set feature <parameter>name</parameter> to <parameter>val</parameter>
  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.
  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
  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
  | Utility feature functions
  void | f_remove (const EST_String &name) remove feature <parameter>name</parameter>
  void | evaluate_features () find all the attributes whose values are functions, and replace them with their evaluation.
  int | f_present (const EST_String &name) const TRUE if feature is present, FALSE otherwise
  | Cross relational access
  EST_Item* | as_relation (const char* relname) const View item from another relation (const char *) method
  int | in_relation (const EST_String &relname) const TRUE if this item is in named relation
  EST_TKVL<EST_String, EST_Val> & | relations () Access to the relation links
  const EST_String& | relation_name () const The relation name of this particular item
  EST_Relation* | relation (void) const The relation of this particular item
  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 ....

`Constructor Functions`

`EST_Item()`
  Default constructor

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

`EST_Item(EST_Relation* rel)`
  Includes reference to relation

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

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

`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

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

  `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

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

  `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

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

  `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

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

  `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

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

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

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

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

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

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

  `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.

  `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

  `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

`Utility feature functions`

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

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

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

`Cross relational access`

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

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

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

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

`EST_Relation* relation(void) const`
  The relation of this particular item

`int 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