summaryrefslogtreecommitdiff
path: root/decoder/ff.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-26 17:25:57 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-26 17:25:57 +0000
commitc85ba4a9147d180277c49752d6fbefbfe9c2f392 (patch)
tree2d0e131dd86cca797f30b7ff045b9fd2b02ac6fa /decoder/ff.h
parent72253f2f9874caf830f541fdfb2d615845c503ff (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.h4
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,