ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
meta::sequence::sequence_analyzer::collector Class Referenceabstract

Interface class used for analyzing observations inside user-provided feature functions. More...

#include <sequence_analyzer.h>

Inheritance diagram for meta::sequence::sequence_analyzer::collector:
meta::sequence::sequence_analyzer::basic_collector< const sequence_analyzer > meta::sequence::sequence_analyzer::basic_collector< sequence_analyzer > meta::sequence::sequence_analyzer::basic_collector< Analyzer > meta::sequence::sequence_analyzer::const_collector meta::sequence::sequence_analyzer::default_collector

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

observationobs_
 the observation we are collecting data for
 
observation::feature_vector feats_
 the feature vector that will be placed into the observation
 

Detailed Description

Interface class used for analyzing observations inside user-provided feature functions.

Constructor & Destructor Documentation

meta::sequence::sequence_analyzer::collector::collector ( observation obs)
inline

Constructs the collector over a given observation.

Parameters
obsA pointer to the observation to be analyzed

Member Function Documentation

virtual void meta::sequence::sequence_analyzer::collector::add ( const std::string &  feat,
double  amount 
)
inlinevirtual

Adds a new feature to this observation.

Parameters
featThe string representation of the feature to add
amountThe value associated with this feature (typically 1)

Reimplemented in meta::sequence::sequence_analyzer::const_collector.

virtual feature_id meta::sequence::sequence_analyzer::collector::feature ( const std::string &  feat)
protectedpure virtual

The documentation for this class was generated from the following file: