ModErn Text Analysis
META Enumerates Textual Applications
|
Interface class used for analyzing observations inside user-provided feature functions. More...
#include <sequence_analyzer.h>
Public Member Functions | |
collector (observation *obs) | |
Constructs the collector over a given observation. More... | |
~collector () | |
Writes all analyzed information out to the observation. | |
virtual void | add (const std::string &feat, double amount) |
Adds a new feature to this observation. More... | |
Protected Member Functions | |
virtual feature_id | feature (const std::string &feat)=0 |
Protected Attributes | |
observation * | obs_ |
the observation we are collecting data for | |
observation::feature_vector | feats_ |
the feature vector that will be placed into the observation | |
Interface class used for analyzing observations inside user-provided feature functions.
|
inline |
Constructs the collector over a given observation.
obs | A pointer to the observation to be analyzed |
|
inlinevirtual |
Adds a new feature to this observation.
feat | The string representation of the feature to add |
amount | The value associated with this feature (typically 1) |
Reimplemented in meta::sequence::sequence_analyzer::const_collector.
|
protectedpure virtual |
feat | The feature to obtain an id for |
Implemented in meta::sequence::sequence_analyzer::basic_collector< Analyzer >, meta::sequence::sequence_analyzer::basic_collector< const sequence_analyzer >, and meta::sequence::sequence_analyzer::basic_collector< sequence_analyzer >.