35 #include "EST_ling_class.h"
47 p.
set(
"NAME",
"example");
49 p.
set(
"DURATION", 2.76);
57 cout <<
"Part of speech for p is " << p.
S(
"POS") << endl;
58 cout <<
"Duration for p is " << p.
F(
"DURATION") << endl;
59 cout <<
"Stress value for p is " << p.
I(
"STRESS") << endl;
66 cout <<
"Part of speech for p is "
67 << p.
S(
"POS") << endl;
68 cout <<
"Syntactic Category for p is "
69 << p.
S(
"CAT",
"Noun") << endl;
78 p.
set(
"CONTINUANT",
"-");
79 p.
set(
"SONORANT",
"-");
82 p.
set(
"PLACE OF ARTICULATION", f);
84 p.
A(
"PLACE OF ARTICULATION").
set(
"CORONAL",
"+");
85 p.
A(
"PLACE OF ARTICULATION").
set(
"ANTERIOR",
"+");
95 f2.
set(
"CORONAL",
"+");
96 f2.
set(
"ANTERIOR",
"+");
98 p.
set(
"PLACE OF ARTICULATION", f2);
107 cout <<
"Anterior value is: " << p.
A(
"PLACE OF ARTICULATION").
S(
"ANTERIOR");
108 cout <<
"Coronal value is: " << p.
A(
"PLACE OF ARTICULATION").
S(
"CORONAL");
112 cout <<
"Anterior value is: " << p.
S(
"PLACE OF ARTICULATION.ANTERIOR");
113 cout <<
"Coronal value is: " << p.
S(
"PLACE OF ARTICULATION.CORONAL");
119 p.
set(
"PLACE OF ARTICULATION.CORONAL",
"+");
120 p.
set(
"PLACE OF ARTICULATION.ANTERIOR",
"+");
129 cout <<
"This is true: " << p.
f_present(
"PLACE OF ARTICULATION");
130 cout <<
"This is false: " << p.
f_present(
"MANNER");
136 p.
f_remove(
"PLACE OF ARTICULATION");
149 a->
set(
"TYPE",
"consonant");
154 a->
set(
"TYPE",
"vowel");
159 a->
set(
"TYPE",
"consonant");
166 a->
set(
"TYPE",
"consonant");
171 a->
set(
"NAME",
"ei");
172 a->
set(
"TYPE",
"vowel");
178 a = phones.prepend();
181 a->
set(
"TYPE",
"consonant");
183 a = phones.prepend();
186 a->
set(
"TYPE",
"vowel");
196 for (s = phones.
head(); s != 0; s = s->next())
197 cout << s->
S(
"NAME") << endl;
202 for (s = phones.
tail(); s != 0; s = s->prev())
203 cout << s->
S(
"NAME") << endl;
208 for (s = phones.
head(); s; s = s->next())
209 cout << s->
S(
"NAME") << endl;
225 np->
set(
"CAT",
"NP");
228 n->
set(
"CAT",
"PRO");
231 n->
set(
"NAME",
"John");
234 vp->
set(
"CAT",
"VP");
237 n->
set(
"CAT",
"VERB");
239 n->
set(
"NAME",
"loves");
242 np->
set(
"CAT",
"NP");
245 n->
set(
"CAT",
"DET");
247 n->
set(
"NAME",
"the");
250 n->
set(
"CAT",
"NOUN");
252 n->
set(
"NAME",
"woman");
266 else if (n->next() != 0)
298 cout << s->
S(
"NAME") << endl;
353 cout << *utt.
relation(
"Syntax") <<
"\n";
357 cout << *utt.
relation(
"Word") <<
"\n";
EST_Item * first_leaf(const EST_Item *n)
return the first leaf (terminal node) which is dominated by n. Note that this is different from daugh...
EST_Item * append_daughter(EST_Item *n, EST_Item *p=0)
EST_Relation * create_relation(const EST_String &relname)
create a new relation called n.
void set(const EST_String &name, int ival)
const EST_String S(const EST_String &path) const
void set(const EST_String &name, int ival)
const int I(const EST_String &name) const
EST_Features & A(const EST_String &name) const
EST_Item * last_leaf(const EST_Item *n)
const EST_String S(const EST_String &name) const
EST_Relation * relation(const char *name, int err_on_not_found=1) const
get relation by name
EST_Item * next_leaf(const EST_Item *n)
const float F(const EST_String &name) const
void f_remove(const EST_String &name)
EST_Item * parent(const EST_Item *n)
return parent of n
EST_Item * daughter1(const EST_Item *n)
return first daughter of n
int f_present(const EST_String &name) const