diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-26 17:25:57 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-26 17:25:57 +0000 |
commit | faea049a3c2adc9cb373414e084976e032886dfb (patch) | |
tree | d3b64224f0a17acf00349dab7befb12eda9dd0a2 /decoder/ff.h | |
parent | 5f7390dfff25569611485c668ee00c216f02143b (diff) |
comment cleanup
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@421 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff.h')
-rw-r--r-- | decoder/ff.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/ff.h b/decoder/ff.h index 5c1f214f..08715766 100644 --- a/decoder/ff.h +++ b/decoder/ff.h @@ -2,6 +2,7 @@ #define _FF_H_ #include <vector> +#include <cstring> #include "fdict.h" #include "hg.h" @@ -29,6 +30,7 @@ class FeatureFunction { static std::string usage_helper(std::string const& name,std::string const& params,std::string const& details,bool show_params,bool show_details); static Features single_feature(int feat); public: + // stateless feature that doesn't depend on source span: override and return true. then your feature can be precomputed over rules. virtual bool rule_feature() const { return false; } @@ -81,6 +83,8 @@ public: // of the particular FeatureFunction class. There is one exception: // equality of the contents (i.e., memcmp) is required to determine whether // two states can be combined. + + // by Log, I mean that the edge is non-const only so you can log to it with INFO_EDGE(edge,msg<<"etc."). most features don't use this so implement the below. it has a different name to allow a default implementation without name hiding when inheriting + overriding just 1. virtual void TraversalFeaturesLog(const SentenceMetadata& smeta, Hypergraph::Edge& edge, // this is writable only so you can use log() const std::vector<const void*>& ant_contexts, |