1 #ifndef HEAD_SEMANTIC_EVENT_H_
2 #define HEAD_SEMANTIC_EVENT_H_
13 #include <boost/make_shared.hpp>
31 const size_t& type_code,
34 const bool learn =
true
103 return boost::make_shared<Head_semantic_event>(
data_, learn);
124 void update_event_views()
127 boost::make_shared<Hsem_view>(
void print_view_counts(std::ostream &os) const
display the count data associated with this node
Definition: Head_semantic_event.cpp:46
std::vector< Value_type > Data_type
Definition: Tree_event.h:36
void resample_table_assignments()
resample CRP table assignments for all component event views
Definition: Head_semantic_event.h:93
bool learn_
Definition: Tree_event.h:183
double log_probability(const bool &collins=false) const
compute smoothed probability of this event
Definition: Head_semantic_event.cpp:29
Value_type & data_in_slot(const Key_type &variable)
return data in position as lvalue
Definition: Tree_event.cpp:119
void reacquire_view_counts()
release counts for associated views (treat as unobserved)
Definition: Head_semantic_event.h:82
Event_ptr get_a_copy(bool learn=false) const
produce a deep copy of this event and return a smart pointer
Definition: Head_semantic_event.h:101
Semantic_data_base::Hash_pair Sem_hash_pair
Definition: Tree_event.h:42
void print_with_links(std::ostream &os) const
display the immediate path to this node
Definition: Head_semantic_event.cpp:34
Definition: Semantic_step_event.h:15
boost::shared_ptr< Semantic_step_event > Event_ptr
Definition: Semantic_step_event.h:18
Data_type data_
Definition: Tree_event.h:182
Head_semantic_event(const Data_type &data, bool learn=false)
construct from data vector directly
Definition: Head_semantic_event.h:39
Definition: Head_semantic_event.h:18
Head_semantic_event(const Step_code_t &step_code, const size_t &type_code, const Node_data &parent_data, const Sem_hash_pair &parent_sem_data, const bool learn=true)
constructor from individual data elements
Definition: Head_semantic_event.cpp:12
void release_view_counts()
release counts for associated views (treat as unobserved)
Definition: Head_semantic_event.h:71
void update_semantic_context(const Sem_hash_pair &parent_semantics, const Sem_hash_pair &)
update semantic context features
Definition: Head_semantic_event.h:59
boost::tuple< Word_type, Label_type, Label_type > Node_data
Definition: Tree_event.h:41
boost::shared_ptr< Hsem_view > hsem_view
Definition: Head_semantic_event.h:21
boost::bimap< int, std::string > Map
Definition: Event_traits.h:34
Code
Definition: SemanticIO.h:54
static const Key_slots::Map variable_map
Definition: Event_traits.h:275