53 return s->
F(
"end")-s->
prev()->
F(
"end");
63 return (s->
prev() == 0) ? 0.0 : s->
prev()->
F(
"end");
73 cerr <<
"item: " << *s << endl;
74 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
79 cout <<
"us features phrase pos\n";
81 cout <<
"start: " << a->
F(
"start") << endl;
82 cout <<
"end: " << a->
F(
"end") << endl;
84 if (s->
S(
"name",
"0") ==
"phrase_start")
96 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
100 cout <<
"us features tilt pos\n";
101 cout <<
"dereferencing syllable: " << *a << endl;
102 cout <<
"vowel_start: " << a->
F(
"vowel_start") << endl;
103 cout <<
"start: " << a->
F(
"start") << endl;
104 cout <<
"end: " << a->
F(
"end") << endl;
106 return a->
F(
"vowel_start") + s->
F(
"rel_pos",0.0);
112 EST_error(
"Attempted to use leaf end() feature function on " 113 "item with no time_path feature set: %s\n",
120 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
126 return getFloat(*a,
"end", def, stat);
132 EST_error(
"Attempted to use leaf start() feature function on " 133 "item with no time_path feature set: %s\n",
140 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
148 return getFloat(*a,
"start", def, stat);
157 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
163 return getFloat(*a,
"start", def, stat);
172 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
178 return getFloat(*a,
"end", def, stat);
184 cerr <<
"register_standard_feature_functions()\n";
203 cerr <<
"finished register_standard_feature_functions()\n";
EST_Val ff_int_start(EST_Item *s)
float getFloat(const EST_Features &f, const EST_String name, float def, EST_feat_status &status)
Return the values as a float.
void register_func(const EST_String &name, const EST_Item_featfunc func)
EST_Val ff_tilt_phrase_position(EST_Item *s)
EST_Val ff_duration(EST_Item *s)
EST_Item * as_relation(const char *relname) const
View item from another relation (const char *) method.
EST_Val ff_int_end(EST_Item *s)
const EST_String & name() const
float F(const EST_String &name) const
EST_Relation * relation(void) const
The relation of this particular item.
EST_Item * first_leaf_in_tree(const EST_Item *root)
EST_Val ff_leaf_start(EST_Item *s)
EST_Val ff_leaf_end(EST_Item *s)
EST_Val ff_tilt_event_position(EST_Item *s)
void register_standard_feature_functions(EST_FeatureFunctionPackage &p)
const EST_String S(const EST_String &name) const
EST_Item * last_leaf_in_tree(const EST_Item *root)
EST_Item * parent(const EST_Item *n)
return parent of n
EST_Val ff_start(EST_Item *s)
int f_present(const EST_String &name) const