1 #ifndef MOD_SEMANTIC_EVENT_H_
2 #define MOD_SEMANTIC_EVENT_H_
13 #include <boost/make_shared.hpp>
31 const size_t& type_code,
100 msem_view -> resample_table_assignment();
107 return boost::make_shared<Mod_semantic_event>(
data_, learn);
128 void update_event_views()
131 boost::make_shared<Msem_view>(
boost::tuple< size_t, size_t > Hash_pair
Definition: Semantic_elaboration.h:114
void update_semantic_context(const Semantic_data_base::Hash_pair &parent_semantics, const Semantic_data_base::Hash_pair &head_semantics)
replace semantic context with new data and update views
Definition: Mod_semantic_event.h:62
std::vector< Value_type > Data_type
Definition: Tree_event.h:36
void print_with_links(std::ostream &os) const
display the immediate path to this node
Definition: Mod_semantic_event.cpp:40
bool learn_
Definition: Tree_event.h:183
Event_ptr get_a_copy(bool learn=false) const
produce a deep copy of this event and return a smart pointer
Definition: Mod_semantic_event.h:105
boost::shared_ptr< Msem_view > msem_view
Definition: Mod_semantic_event.h:21
Value_type & data_in_slot(const Key_type &variable)
return data in position as lvalue
Definition: Tree_event.cpp:119
double dist(const pt a, const pt b)
compute approx. Great Circle distance between two UTM points
Definition: layer.cpp:45
Semantic_data_base::Hash_pair Sem_hash_pair
Definition: Tree_event.h:42
Value_type Distance_type
Definition: Tree_event.h:40
void resample_table_assignments()
resample CRP table assignments for all component event views
Definition: Mod_semantic_event.h:98
Mod_semantic_event(const Step_code_t &step_code, const size_t &type_code, const Node_data &parent_data, const Node_data &head_data, const Sem_hash_pair &parent_sem_data, const Sem_hash_pair &head_sem_data, const Distance_type &dist, bool learn=true)
constructor from individual data elements
Definition: Mod_semantic_event.cpp:12
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
void release_view_counts()
release counts for associated views (treat as unobserved)
Definition: Mod_semantic_event.h:76
Mod_semantic_event(const Data_type &data, bool learn=false)
construct from data vector directly
Definition: Mod_semantic_event.h:42
void print_view_counts(std::ostream &os) const
display the count data associated with this node
Definition: Mod_semantic_event.cpp:55
static const Key_slots::Map variable_map
Definition: Event_traits.h:301
double log_probability(const bool &collins=false) const
compute smoothed probability of this event
Definition: Mod_semantic_event.cpp:35
boost::tuple< Word_type, Label_type, Label_type > Node_data
Definition: Tree_event.h:41
Definition: Mod_semantic_event.h:18
void reacquire_view_counts()
release counts for associated views (treat as unobserved)
Definition: Mod_semantic_event.h:87
boost::bimap< int, std::string > Map
Definition: Event_traits.h:34
Code
Definition: SemanticIO.h:54