ModErn Text Analysis
META Enumerates Textual Applications
|
Analyzer responsible for converting a parser state to a feature_vector. More...
#include <state_analyzer.h>
Public Member Functions | |
feature_vector | featurize (const state &state) const |
Maps a state to its feature vector representation. | |
Private Member Functions | |
void | unigram_featurize (const state &state, feature_vector &feats) const |
Adds unigram features. More... | |
void | bigram_featurize (const state &state, feature_vector &feats) const |
Adds bigram features. More... | |
void | trigram_featurize (const state &state, feature_vector &feats) const |
Adds trigram features. More... | |
void | children_featurize (const state &state, feature_vector &feats) const |
Adds children features. More... | |
void | dependents_featurize (const state &state, feature_vector &feats) const |
Adds dependent features. More... | |
void | unigram_stack_feats (const node *n, std::string prefix, feature_vector &feats) const |
Adds unigram features from the parser stack. More... | |
void | bigram_features (const node *n1, std::string name1, const node *n2, std::string name2, feature_vector &feats) const |
Adds bigram features to the feature vector. More... | |
void | child_feats (const node *n, std::string prefix, feature_vector &feats, bool doubs) const |
Adds child features to the feature vector. More... | |
Analyzer responsible for converting a parser state to a feature_vector.
|
private |
Adds unigram features.
state | The current parser state |
feats | The feature vector to put features in |
|
private |
Adds bigram features.
state | The current parser state |
feats | The feature vector to put features in |
|
private |
Adds trigram features.
state | The current parser state |
feats | The feature vector to put features in |
|
private |
Adds children features.
state | The current parser state |
feats | The feature vector to put features in |
|
private |
Adds dependent features.
state | The current parser state |
feats | The feature vector to put features in |
|
private |
Adds unigram features from the parser stack.
n | The node from the stack |
prefix | The feature name prefix |
feats | The feature vector to put features in |
|
private |
Adds bigram features to the feature vector.
n1 | The first node |
name1 | The feature name prefix for the first node |
n2 | The second node |
name2 | The feature name prefix of the second node |
feats | The feature vector put features in |
|
private |
Adds child features to the feature vector.
n | The node to add child features for |
prefix | The feature name prefix |
feats | The feature vector to put features in |
doubs | Whether or not to add features for children two steps down |