#include <iostream>

#include "moses/ChartHypothesis.h"

#include "SparseReorderingFeature.h"

using namespace std;

namespace Moses
{

SparseReorderingFeature::SparseReorderingFeature(const std::string &line)
  :StatefulFeatureFunction("StatefulFeatureFunction",0, line)
{
  cerr << "Constructing a Sparse Reordering feature" << endl;
}

FFState* SparseReorderingFeature::EvaluateChart(
  const ChartHypothesis&  cur_hypo ,
  int  featureID /*- used to index the state in the previous hypotheses */,
  ScoreComponentCollection* accumulator) const
{
  // get index map for underlying hypotheses
  const AlignmentInfo::NonTermIndexMap &nonTermIndexMap =
    cur_hypo.GetCurrTargetPhrase().GetAlignNonTerm().GetNonTermIndexMap();

  return new SparseReorderingState();
}


}


#include <iostream>

#include "SparseReorderingFeature.h"

using namespace std;

namespace Moses
{

SparseReorderingFeature::SparseReorderingFeature(const std::string &line)
  :StatefulFeatureFunction("StatefulFeatureFunction", line)
{
  cerr << "Constructing a Sparse Reordering feature" << endl;
}

FFState* SparseReorderingFeature::EvaluateChart(
  const ChartHypothesis& /* cur_hypo */,
  int /* featureID - used to index the state in the previous hypotheses */,
  ScoreComponentCollection* accumulator) const
{
  return new SparseReorderingState();
}


}


--- 
+++ 
@@ -1,4 +1,6 @@
 #include <iostream>
+
+#include "moses/ChartHypothesis.h"
 
 #include "SparseReorderingFeature.h"
 
@@ -8,16 +10,20 @@
 {
 
 SparseReorderingFeature::SparseReorderingFeature(const std::string &line)
-  :StatefulFeatureFunction("StatefulFeatureFunction", line)
+  :StatefulFeatureFunction("StatefulFeatureFunction",0, line)
 {
   cerr << "Constructing a Sparse Reordering feature" << endl;
 }
 
 FFState* SparseReorderingFeature::EvaluateChart(
-  const ChartHypothesis& /* cur_hypo */,
-  int /* featureID - used to index the state in the previous hypotheses */,
+  const ChartHypothesis&  cur_hypo ,
+  int  featureID /*- used to index the state in the previous hypotheses */,
   ScoreComponentCollection* accumulator) const
 {
+  // get index map for underlying hypotheses
+  const AlignmentInfo::NonTermIndexMap &nonTermIndexMap =
+    cur_hypo.GetCurrTargetPhrase().GetAlignNonTerm().GetNonTermIndexMap();
+
   return new SparseReorderingState();
 }
 
Set dense feature count to 0
