43 #include "ling_class/EST_Item.h"
44 #include "ling_class/EST_Relation.h"
45 #include "ling_class/EST_Item_Content.h"
46 #include "ling_class/EST_item_aux.h"
51 return s->
F(
"end")-s->prev()->
F(
"end");
61 return (s->prev() == 0) ? 0.0 : s->prev()->
F(
"end");
71 cerr <<
"item: " << *s << endl;
72 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
77 cout <<
"us features phrase pos\n";
79 cout <<
"start: " << a->
F(
"start") << endl;
80 cout <<
"end: " << a->
F(
"end") << endl;
82 if (s->
S(
"name",
"0") ==
"phrase_start")
94 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
98 cout <<
"us features tilt pos\n";
99 cout <<
"dereferencing syllable: " << *a << endl;
100 cout <<
"vowel_start: " << a->
F(
"vowel_start") << endl;
101 cout <<
"start: " << a->
F(
"start") << endl;
102 cout <<
"end: " << a->
F(
"end") << endl;
104 return a->
F(
"vowel_start") + s->
F(
"rel_pos",0.0);
110 EST_error(
"Attempted to use leaf end() feature function on "
111 "item with no time_path feature set: %s\n",
118 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
120 a = last_leaf_in_tree(t);
123 EST_feat_status stat;
124 return getFloat(*a,
"end", def, stat);
130 EST_error(
"Attempted to use leaf start() feature function on "
131 "item with no time_path feature set: %s\n",
138 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
140 a = first_leaf_in_tree(t);
145 EST_feat_status stat;
146 return getFloat(*a,
"start", def, stat);
155 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
157 a = first_leaf_in_tree(parent(t)->as_relation(
"MetricalTree"));
160 EST_feat_status stat;
161 return getFloat(*a,
"start", def, stat);
170 EST_error(
"No relation %s for item\n", (
const char *) rel_name);
172 a = last_leaf_in_tree(parent(t)->as_relation(
"MetricalTree"));
175 EST_feat_status stat;
176 return getFloat(*a,
"end", def, stat);
182 cerr <<
"register_standard_feature_functions()\n";
184 p.register_func(
"duration", ff_duration);
185 p.register_func(
"start", ff_start);
186 p.register_func(
"leaf_end", ff_leaf_end);
187 p.register_func(
"leaf_start", ff_leaf_start);
188 p.register_func(
"int_end", ff_int_end);
189 p.register_func(
"int_start", ff_int_start);
190 p.register_func(
"tilt_event_position", ff_tilt_event_position);
191 p.register_func(
"tilt_phrase_position", ff_tilt_phrase_position);
192 p.register_func(
"unisyn_duration", ff_duration);
193 p.register_func(
"unisyn_start", ff_start);
194 p.register_func(
"unisyn_leaf_end", ff_leaf_end);
195 p.register_func(
"unisyn_leaf_start", ff_leaf_start);
196 p.register_func(
"unisyn_int_end", ff_int_end);
197 p.register_func(
"unisyn_int_start", ff_int_start);
198 p.register_func(
"unisyn_tilt_event_position", ff_tilt_event_position);
199 p.register_func(
"unisyn_tilt_phrase_position", ff_tilt_phrase_position);
201 cerr <<
"finished register_standard_feature_functions()\n";