Training data for the parser.
More...
#include <training_data.h>
|
std::vector< parse_tree > & | trees_ |
| A reference to the collection of training trees.
|
|
std::vector< std::vector< trans_id > > | all_transitions_ |
| The gold standard transitions for each tree.
|
|
std::vector< size_t > | indices_ |
| The vector of indices used for fast shuffling.
|
|
std::default_random_engine | rng_ |
| The random number generator used for shuffling.
|
|
Training data for the parser.
meta::parser::sr_parser::training_data::training_data |
( |
std::vector< parse_tree > & |
trees, |
|
|
std::default_random_engine::result_type |
seed |
|
) |
| |
- Parameters
-
trees | The raw training data |
seed | The seed to used for seeding the rng for shuffling examples |
auto meta::parser::sr_parser::training_data::preprocess |
( |
| ) |
|
Preprocesses all of the training trees.
This currently runs the following transformations across all of the training data:
- Returns
- a transition_map to associate all transition names with ids in the binarized training data
size_t meta::parser::sr_parser::training_data::size |
( |
| ) |
const |
- Returns
- the number of training examples
const parse_tree & meta::parser::sr_parser::training_data::tree |
( |
size_t |
idx | ) |
const |
- Parameters
-
idx | The index to seek into the training data |
- Returns
- the parse tree at that position in the training data
auto meta::parser::sr_parser::training_data::transitions |
( |
size_t |
idx | ) |
const |
- Parameters
-
idx | The index to seek into the training data |
- Returns
- the transitions taken to assemble the gold tree
The documentation for this class was generated from the following files: