1 #ifndef SEMANTIC_TREES_BY_HAND_H_
2 #define SEMANTIC_TREES_BY_HAND_H_
14 #include <boost/make_shared.hpp>
48 std::vector<Sentence_sem> result;
75 e = boost::make_shared<Elaboration_tree>(
"TABLE");
76 e->elaborate_color(
"BROWN");
77 e->elaborate_with_relation(
"FRONT_OF",
"COUCH");
79 e->null_elaboration();
87 "In front of the couch is a wood table with a small sailboat "
89 result.
image =
"indoor_0021.jpg";
92 "(ROOT (S (NP (DT The) (NN table) ) (VP (VBZ has) "
93 "(NP (NP (DT some) (NNS flowers) ) (PP (IN on) (NP (PRP it) "
99 e = boost::make_shared<Elaboration_tree>(
"TABLE");
100 e->elaborate_size(
"SMALL");
101 e->elaborate_with_relation(
"NEXT_TO",
"COUCH");
102 e->elaborate_with_relation(
"SUPPORTS",
"LAMP");
103 e->null_elaboration();
104 e->null_elaboration();
105 e->null_elaboration();
110 "Next to the couch is a small table with a lit lamp on top . ";
111 result.
image =
"indoor_0021.jpg";
122 e = boost::make_shared<Elaboration_tree>(
"TABLE");
123 e->elaborate_with_relation(
"CONTAINED_BY_RIGHT",
"ROOM");
124 e->elaborate_with_relation(
"NEAR",
"CHAIR");
125 e->elaborate_with_relation(
"NEAR",
"CHAIR");
126 e->elaborate_size(
"LONG");
127 e->elaborate_color(
"BROWN");
128 e->null_elaboration();
129 e->elaborate_color(
"BROWN");
130 e->null_elaboration();
131 e->elaborate_size(
"LONG");
132 e->null_elaboration();
137 "One the right is a long wooden table with a wooden chair "
138 "and a long bench around it . ";
141 result.
image =
"indoor_0436.jpg";
144 "(ROOT (S (PP (IN On) (NP (DT the) (NN right) ) ) (VP (VBZ is) (NP (NP (DT a) (JJ long) (JJ wooden) (NN table) ) (PP (IN with) (NP (NP (CD two) (JJ wooden) (NNS chairs) ) (CC and) (NP (CD two) ) ) ) ) ) (NP (NP (JJ long) (NNS benches) ) (PP (IN around) (NP (PRP it) ) ) ) (. .) ) )";
151 e = boost::make_shared<Elaboration_tree>(
"TABLE");
152 e->elaborate_with_relation(
"NEAR",
"CHAIR");
153 e->elaborate_with_relation(
"NEAR",
"CHAIR");
154 e->elaborate_size(
"LONG");
155 e->elaborate_color(
"BROWN");
156 e->null_elaboration();
157 e->elaborate_color(
"BROWN");
158 e->null_elaboration();
159 e->elaborate_size(
"LONG");
160 e->null_elaboration();
165 "There is a long wooden table with a wooden chair and a "
166 "long bench around it . ";
169 result.
image =
"indoor_0436.jpg";
182 e = boost::make_shared<Elaboration_tree>(
"COUCH");
183 e->elaborate_with_relation(
"FRONT_OF",
"TABLE");
184 e->null_elaboration();
185 e->elaborate_with_relation(
"CONTAINED_BY_LEFT",
"ROOM");
190 "In front of the table on the left is a couch . ";
191 result.
image =
"living-room-modern.jpg";
198 e = boost::make_shared<Elaboration_tree>(
"TABLE");
199 e->elaborate_with_relation(
"LEFT_OF",
"COUCH");
202 e->elaborate_color(
"BLACK");
212 "To the left of the couch is a black topped table "
213 "with a vase of white flowers on the center .";
214 result.
image =
"living-room-modern.jpg";
217 "(ROOT (SINV (PP (TO To) (NP (NP (DT the) (NN left) ) (PP (IN of) (NP (DT the) (NN couch) ) ) ) ) (VP (VBZ is) ) (NP (NP (DT a) (JJ black) (VBN topped) (NN table) ) (PP (IN with) (NP (NP (DT a) (NN vase) ) (PP (IN of) (NP (JJ white) (NNS flowers) ) ) ) ) (PP (IN on) (NP (DT the) (NN center) ) ) ) (. .) ) )";
222 e = boost::make_shared<Elaboration_tree>(
"TABLE");
223 e->elaborate_with_relation(
"FRONT_OF",
"COUCH");
224 e->elaborate_size(
"TALL");
230 "In front of the couch is a tall thin stand with a cup on it . ";
231 result.
image =
"living-room-modern.jpg";
234 "(ROOT (SINV (PP (IN In) (NP (NP (NN front) ) (PP (IN of) (NP (DT the) (NN couch) ) ) ) ) (VP (VBZ is) ) (NP (NP (DT a) (JJ tall) (JJ thin) (NN stand) ) (PP (IN with) (NP (NP (DT a) (NN cup) ) (PP (IN on) (NP (PRP it) ) ) ) ) ) (. .) ) )";
239 e = boost::make_shared<Elaboration_tree>(
"CHAIR");
240 e->elaborate_with_relation(
"FRONT_OF",
"BED");
241 e->elaborate_with_relation(
"NEAR",
"TABLE");
242 e->elaborate_with_relation(
"NEAR",
"MIRROR");
247 "In front of the bed is a chair with a table and mirror . ";
248 result.
image =
"yellow-bed-room-l.jpg";
251 "(ROOT (SINV (PP (IN In) (NP (NP (NN front) ) (PP (IN of) (NP (DT the) (NN bed) ) ) ) ) (VP (VBZ is) ) (NP (NP (DT a) (NN chair) ) (PP (IN with) (NP (DT a) (NN table) (CC and) (NN mirror) ) ) ) (. .) ) )";
259 e = boost::make_shared<Elaboration_tree>(
"TABLE");
260 e->elaborate_with_relation(
"CONTAINED_BY",
"ROOM");
261 e->elaborate_color(
"WHITE");
266 "There is a table with a white tablecloth "
267 "in the middle of the room . ";
268 result.
image =
"0000000013.jpg";
271 "(ROOT (S (NP (EX There) ) (VP (VBZ is) (NP (NP (DT a) (NN table) ) (PP (IN with) (NP (NP (DT a) (JJ white) (NN tablecloth) ) (PP (IN in) (NP (NP (DT the) (NN middle) ) (PP (IN of) (NP (DT the) (NN room) ) ) ) ) ) ) ) ) (. .) ) )";
276 e = boost::make_shared<Elaboration_tree>(
"TABLE");
281 result.
sentence =
"The table has some flowers on it.";
282 result.
image =
"0000000013.jpg";
285 "(ROOT (S (NP (DT The) (NN table) ) (VP (VBZ has) (NP (NP (DT some) (NNS flowers) ) (PP (IN on) (NP (PRP it) ) ) ) ) (. .) ) )";
293 e = boost::make_shared<Elaboration_tree>(
"ROOM");
294 e->elaborate_with_relation(
"CONTAINS",
"TABLE");
295 e->null_elaboration();
296 e->elaborate_with_relation(
"SUPPORTS",
"LAMP");
297 e->elaborate_color(
"BROWN");
302 "A corner of a room with a single wooden table with a lamp on it . ";
303 result.
image =
"IMG_2435.jpg";
306 "(NP (NP (DT A) (NN corner) ) (PP (IN of) (NP (NP (DT a) (NN room) ) (PP (IN with) (NP (DT a) (JJ single) (JJ wooden) (NN table) ) ) ) ) (PP (IN with) (NP (NP (DT a) (NN lamp) ) (PP (IN on) (NP (PRP it) ) ) ) ) (. .) ) )";
311 e = boost::make_shared<Elaboration_tree>(
"BED");
312 e->elaborate_with_relation(
"CONTAINED_BY",
"ROOM");
316 result.
sentence =
"In the middle of the room is a bed . ";
317 result.
image =
"2333_2.jpg";
320 "(SINV (PP (IN In) (NP (NP (DT the) (NN middle) ) (PP (IN of) (NP (DT the) (NN room) ) ) ) ) (VP (VBZ is) ) (NP (DT a) (NN bed) ) (. .) ) )";
326 e = boost::make_shared<Elaboration_tree>(
"LAMP");
327 e->elaborate_color(
"GREEN");
328 e->elaborate_with_relation(
"ABOVE",
"COUCH");
334 "Above the couch are two green lamps "
335 "and a keep calm carry on poster .";
336 result.
image =
"2086268311_4315366940_m.jpg";
339 "(S (S (ADVP (IN Above) ) (NP (DT the) (NN couch) ) (VP (VBP are) (NP (CD two) (JJ green) (NNS lamps) ) ) ) (CC and) (S (NP (DT a) ) (VP (VB keep) (ADJP (JJ calm) (SBAR (S (VP (VBP carry) (PP (IN on) (NP (NN poster) ) ) ) ) ) ) ) ) (. .) ) )";
std::string caption_id
Definition: semantic_trees_by_hand.h:22
Definition: semantic_trees_by_hand.h:19
std::string sentence
Definition: semantic_trees_by_hand.h:23
Sentence_sem build_semantic_tree(size_t index)
Definition: semantic_trees_by_hand.h:66
void initialize_semantic_maps()
read in mappings from files, default config path
Definition: Semantic_traits.cpp:53
std::string parse
Definition: semantic_trees_by_hand.h:26
the main "Semantic tree" object
Definition: Elaboration_tree.h:23
std::string image
Definition: semantic_trees_by_hand.h:24
std::string example_id
Definition: semantic_trees_by_hand.h:21
std::vector< Sentence_sem > collect_semantic_trees()
Definition: semantic_trees_by_hand.h:31
boost::shared_ptr< Elaboration_tree > Self_ptr
Definition: Elaboration_tree.h:29
semantics::Elaboration_tree::Self_ptr etree
Definition: semantic_trees_by_hand.h:25