Database class to read and count parse tree events.
More...
#include <Event_parser.h>
|
| Event_db () |
| default ctor, creates empty database More...
|
|
| Event_db (std::string event_file, std::string lexicon_file, bool learn=true, int num_lines=10000) |
| constructs an event database object More...
|
|
Event_ptr | get_tree (const int &i) const |
| gets pointer to tree in position i in the list More...
|
|
void | print_tree (const int &i, std::ostream &os) const |
| print tree in position i to ostream os More...
|
|
size_t | num_trees () const |
| returns number of trees in list More...
|
|
size_t | num_events () const |
| returns number of events More...
|
|
Database class to read and count parse tree events.
semantics::Event_db::Event_db |
( |
| ) |
|
|
inline |
default ctor, creates empty database
semantics::Event_db::Event_db |
( |
std::string |
event_file, |
|
|
std::string |
lexicon_file, |
|
|
bool |
learn = true , |
|
|
int |
num_lines = 10000 |
|
) |
| |
|
inline |
constructs an event database object
- Parameters
-
event_file | (path-to-)filename as string |
learn | if true, counts events and builds a probability model |
Event_ptr semantics::Event_db::get_tree |
( |
const int & |
i | ) |
const |
|
inline |
gets pointer to tree in position i in the list
- Returns
- pointer to the root event of tree i
static Lexicon_db& semantics::Event_db::lexicon |
( |
| ) |
|
|
inlinestatic |
returns a reference to the map between words and codes
static LF_map_t& semantics::Event_db::lf_word_map |
( |
| ) |
|
|
inlinestatic |
accessor to a global map flagging low frequency words
returns a reference to the map between nonterminals and codes
size_t semantics::Event_db::num_events |
( |
| ) |
const |
|
inline |
size_t semantics::Event_db::num_trees |
( |
| ) |
const |
|
inline |
returns number of trees in list
void semantics::Event_db::print_tree |
( |
const int & |
i, |
|
|
std::ostream & |
os |
|
) |
| const |
|
inline |
print tree in position i to ostream os
bool semantics::Event_db::VERBOSE = false |
|
static |
The documentation for this class was generated from the following files: