summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-10-16 11:59:21 -0400
committerChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-10-16 11:59:21 -0400
commitad6d4a1b2519896f2b16a282699ce4e64041fab8 (patch)
tree09af91c749dad121d25edac20660493bac3ebf31
parentabe2363c01cab3e8e94ca5a44069756d87548bd7 (diff)
remove confusing function
-rw-r--r--decoder/ff.cc7
-rw-r--r--decoder/ff.h10
-rw-r--r--decoder/ffset.cc2
3 files changed, 2 insertions, 17 deletions
diff --git a/decoder/ff.cc b/decoder/ff.cc
index 6e276a5e..a6a035b5 100644
--- a/decoder/ff.cc
+++ b/decoder/ff.cc
@@ -25,13 +25,6 @@ string FeatureFunction::usage_helper(std::string const& name,std::string const&
return r;
}
-void FeatureFunction::FinalTraversalFeatures(const SentenceMetadata& /* smeta */,
- const HG::Edge& /* edge */,
- const void* residual_state,
- SparseVector<double>* final_features) const {
- FinalTraversalFeatures(residual_state,final_features);
-}
-
void FeatureFunction::TraversalFeaturesImpl(const SentenceMetadata&,
const Hypergraph::Edge&,
const std::vector<const void*>&,
diff --git a/decoder/ff.h b/decoder/ff.h
index 4acbb7e3..3280592e 100644
--- a/decoder/ff.h
+++ b/decoder/ff.h
@@ -51,18 +51,10 @@ class FeatureFunction {
}
// if there's some state left when you transition to the goal state, score
- // it here. For example, the language model computes the cost of adding
+ // it here. For example, a language model might the cost of adding
// <s> and </s>.
-
-protected:
virtual void FinalTraversalFeatures(const void* residual_state,
SparseVector<double>* final_features) const;
-public:
- //override either this or one of above.
- virtual void FinalTraversalFeatures(const SentenceMetadata& /* smeta */,
- const HG::Edge& /* edge */,
- const void* residual_state,
- SparseVector<double>* final_features) const;
protected:
// context is a pointer to a buffer of size NumBytesContext() that the
diff --git a/decoder/ffset.cc b/decoder/ffset.cc
index 653a29f8..5820f421 100644
--- a/decoder/ffset.cc
+++ b/decoder/ffset.cc
@@ -65,7 +65,7 @@ void ModelSet::AddFinalFeatures(const FFState& state, HG::Edge* edge,SentenceMet
int spos = model_state_pos_[i];
ant_state = &state[spos];
}
- ff.FinalTraversalFeatures(smeta, *edge, ant_state, &edge->feature_values_);
+ ff.FinalTraversalFeatures(ant_state, &edge->feature_values_);
}
edge->edge_prob_.logeq(edge->feature_values_.dot(weights_));
}