1 #ifndef SYNTACTIC_EVENT_H_
2 #define SYNTACTIC_EVENT_H_
27 typedef boost::shared_ptr<Syntactic_event>
Event_ptr;
136 virtual void print(std::ostream& os)
const;
148 virtual void print_subtree(std::ostream& os,
int indent_level = 0)
const;
int id() const
return unique id
Definition: Syntactic_event.h:61
boost::shared_ptr< Syntactic_event > Event_ptr
Definition: Syntactic_event.h:27
void add_head_child(const Event_ptr head)
add the first child
Definition: Syntactic_event.h:74
std::vector< Value_type > Data_type
Definition: Tree_event.h:36
virtual void print_subtree(std::ostream &os, int indent_level=0) const
recursively print full subtree
Definition: Syntactic_event.cpp:74
virtual void print_with_links(std::ostream &) const
virtual function, does nothing at base level
Definition: Syntactic_event.h:144
virtual ~Syntactic_event()
virtual destructor
Definition: Syntactic_event.h:52
void print_child_trees(std::ostream &os, int indent_level) const
print children subtrees in sequence
Definition: Syntactic_event.cpp:128
Definition: Syntactic_event.h:20
Syntactic_event(int id, bool learn)
construct an empty event with data to be filled at derived level
Definition: Syntactic_event.cpp:21
virtual void print(std::ostream &os) const
display this node's data in human readable form
Definition: Syntactic_event.cpp:57
size_t head_pos_
Definition: Syntactic_event.h:193
virtual void update_semantics(const Sem_hash_pair &)
replace semantic data with new data and update views
Definition: Syntactic_event.cpp:50
virtual Event_ptr get_a_copy(bool learn=false) const =0
return a pointer to a deep copy of this instance
Definition: Tree_event.h:26
void add_dependency_child(const Event_ptr child, bool on_left=false)
add a pointer to a new child which is not the head
Definition: Syntactic_event.h:85
virtual void print_subtree_view_counts(std::ostream &, int indent_level=0) const
show counts at each node, recursively descending
Definition: Syntactic_event.cpp:112
Semantic_data_base::Hash_pair Sem_hash_pair
Definition: Tree_event.h:42
virtual const Key_slots::Map & var_map() const =0
return reference to the map between variable names and positions
Event_ptr_container children_
Definition: Syntactic_event.h:194
friend std::ostream & operator<<(std::ostream &os, const Event_ptr e)
Definition: Syntactic_event.h:177
friend std::ostream & operator<<(std::ostream &os, const Syntactic_event &e)
display this node in tree context
Definition: Syntactic_event.h:165
virtual void update_event_views()
update event views
Definition: Syntactic_event.h:108
size_t head_pos() const
return head position
Definition: Syntactic_event.h:66
virtual double subtree_log_probability() const
get log probability of entire subtree
Definition: Syntactic_event.cpp:34
void print_child_constituency_trees(std::ostream &os) const
recursively print subtree as constituency tree with head info
Definition: Syntactic_event.cpp:103
friend std::ostream & operator<<(std::ostream &os, const Syntactic_event *e)
Definition: Syntactic_event.h:171
virtual void print_semantics(std::ostream &os) const
display the semantic node associated with this node
Definition: Syntactic_event.cpp:67
static bool VERBOSE
Static initialization.
Definition: Syntactic_event.h:35
virtual void print_view_counts(std::ostream &) const =0
pure virtual dummy — instantiated versions display count data
std::deque< Self_ptr > Event_ptr_container
Definition: Syntactic_event.h:29
Event_ptr Self_ptr
Definition: Syntactic_event.h:28
virtual void print_constituency_tree_with_head(std::ostream &os) const
recursively print subtree as constituency tree with head info
Definition: Syntactic_event.cpp:85
boost::bimap< int, std::string > Map
Definition: Event_traits.h:34
int id_
Definition: Syntactic_event.h:192