Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2013-08-30 18:49:00 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-08-30 18:49:00 +0400
commit03fd06b38b2d21ac6d0c8ac14a2bdce13fcb9feb (patch)
tree55712b252e6b69962baed2d8ffa6d1e2e9b3d73b /moses/ScoreComponentCollectionTest.cpp
parent70eb3f13b9d0a77d7826a6f8eaeab75ed160138e (diff)
convert Evaluate() methods into abstract, rather than empty functions. Every FF must implement them all
Diffstat (limited to 'moses/ScoreComponentCollectionTest.cpp')
-rw-r--r--moses/ScoreComponentCollectionTest.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/moses/ScoreComponentCollectionTest.cpp b/moses/ScoreComponentCollectionTest.cpp
index be25b5b98..36acf4ba3 100644
--- a/moses/ScoreComponentCollectionTest.cpp
+++ b/moses/ScoreComponentCollectionTest.cpp
@@ -34,12 +34,18 @@ class MockStatelessFeatureFunction : public StatelessFeatureFunction
public:
MockStatelessFeatureFunction(const string& desc, size_t n, const string &line) :
StatelessFeatureFunction(desc,n, line) {}
- virtual void Evaluate(const Hypothesis&, ScoreComponentCollection*) const {}
- virtual void EvaluateChart(const ChartHypothesis&, ScoreComponentCollection*) const {}
- virtual void Evaluate(const TargetPhrase &targetPhrase
+ void Evaluate(const Hypothesis&, ScoreComponentCollection*) const {}
+ void EvaluateChart(const ChartHypothesis&, ScoreComponentCollection*) const {}
+ void Evaluate(const InputType &input
+ , const InputPath &inputPath
+ , ScoreComponentCollection &scoreBreakdown) const
+ {}
+ void Evaluate(const Phrase &source
+ , const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
- , ScoreComponentCollection &estimatedFutureScore) const {
- }
+ , ScoreComponentCollection &estimatedFutureScore) const
+ {}
+
};
class MockSingleFeature : public MockStatelessFeatureFunction
@@ -60,6 +66,7 @@ public:
bool IsUseable(const FactorMask &mask) const {
return true;
}
+
};
class MockSparseFeature : public MockStatelessFeatureFunction