KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Punctuation_event.h
Go to the documentation of this file.
1 #ifndef PUNCTUATION_EVENT_H_
2 #define PUNCTUATION_EVENT_H_
3 
12 #include <iosfwd>
13 
14 namespace semantics
15 {
16 
18 {
19 public:
20 
21  /*------------------------------------------------------------
22  * CONSTRUCTORS AND DESTRUCTOR
23  *------------------------------------------------------------*/
24 
27  Punctuation_event(int id) : Syntactic_event(id, false) {}
28 
29  /*------------------------------------------------------------
30  * ACCESSORS
31  *------------------------------------------------------------*/
32 
36  const Token_map::Key_type&
37  ) const
38  {
39  return dummy;
40  }
41 
45  const Token_map::Key_type&
46  ) const
47  {
48  return dummy;
49  }
50 
51  /*------------------------------------------------------------
52  * MANIPULATORS
53  *------------------------------------------------------------*/
54 
58 
62 
63  /*------------------------------------------------------------
64  * COMPUTATION
65  *------------------------------------------------------------*/
66 
69  double log_probability(const bool&) const {return 0.0;};
70 
73  Event_ptr get_a_copy(bool) const {return Event_ptr(new Punctuation_event(0));}
74 
75  /*------------------------------------------------------------
76  * DISPLAY
77  *------------------------------------------------------------*/
78 
81  void print(std::ostream& os) const {os << dummy;}
82 
85  void print_semantics(std::ostream&) const {}
86 
89  void print_view_counts(std::ostream&) const {}
90 
93  void print_with_links(std::ostream& os) const
94  {
95  os << data_as_nonterminal("");
96  }
97 
100  void print_constituency_tree_with_head(std::ostream& os) const
101  {
103  }
104 
105 private:
106  const Key_slots::Map& var_map() const
107  {
109  }
110 
111  void update_event_views(){}
112  static const Token_map::Key_type dummy;
113 };
114 
115 };
116 
117 #endif
boost::shared_ptr< Syntactic_event > Event_ptr
Definition: Syntactic_event.h:27
boost::tuple< size_t, size_t > Hash_pair
Definition: Semantic_elaboration.h:114
double log_probability(const bool &) const
compute smoothed probability of this event
Definition: Punctuation_event.h:69
Definition: Syntactic_event.h:20
void print(std::ostream &os) const
override print function from Syntactic_event class
Definition: Punctuation_event.h:81
Definition: Punctuation_event.h:17
void print_with_links(std::ostream &os) const
print with links
Definition: Punctuation_event.h:93
std::string Key_type
Definition: Token_map.h:23
void update_semantics(const Semantic_data_base::Hash_pair &)
dummy function from virtual base version
Definition: Punctuation_event.h:57
const Token_map::Key_type & data_as_nonterminal(const Token_map::Key_type &) const
override function from Syntactic_event class
Definition: Punctuation_event.h:44
static const Key_slots::Map variable_map
Definition: Event_traits.h:249
void print_view_counts(std::ostream &) const
print view counts (does nothing, in this case)
Definition: Punctuation_event.h:89
void print_child_constituency_trees(std::ostream &os) const
recursively print subtree as constituency tree with head info
Definition: Syntactic_event.cpp:103
void resample_table_assignments()
resample CRP table assignments for all component event views (no-op)
Definition: Punctuation_event.h:61
boost::bimap< int, std::string > Map
Definition: Event_traits.h:34
Event_ptr get_a_copy(bool) const
get a deep copy of this
Definition: Punctuation_event.h:73
void print_constituency_tree_with_head(std::ostream &os) const
override Syntactic_event::print_constituency_tree_with_head
Definition: Punctuation_event.h:100
const Token_map::Key_type & data_as_word(const Token_map::Key_type &) const
override function from Syntactic_event class
Definition: Punctuation_event.h:35
void print_semantics(std::ostream &) const
override print_semantics to do nothing
Definition: Punctuation_event.h:85
Punctuation_event(int id)
this class doesn't do anything
Definition: Punctuation_event.h:27