diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-11-28 11:11:22 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-11-28 11:11:22 +0100 |
commit | a6b3d3417c6d8a63c36a0fdc9c7cf06f7b06df9f (patch) | |
tree | b86142bbf686a69cc3c9913faee18e073b8eece0 /mteval | |
parent | 0be26bb330f3a976243c9da1d6908d4aaf033ebe (diff) | |
parent | a5b4f06838585874f200c94028cd4d41d54c4f76 (diff) |
Merge branch 'master' of github.com:pks/cdec-dtrain
Diffstat (limited to 'mteval')
-rw-r--r-- | mteval/external_scorer.h | 3 | ||||
-rw-r--r-- | mteval/ns_ext.cc | 2 | ||||
-rw-r--r-- | mteval/ns_ter.cc | 2 | ||||
-rw-r--r-- | mteval/scorer.h | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/mteval/external_scorer.h b/mteval/external_scorer.h index a28fb920..85535655 100644 --- a/mteval/external_scorer.h +++ b/mteval/external_scorer.h @@ -24,7 +24,8 @@ class ScoreServer { int c2p[2]; }; -struct ScoreServerManager { +class ScoreServerManager { + public: static ScoreServer* Instance(const std::string& score_type); private: static std::map<std::string, boost::shared_ptr<ScoreServer> > servers_; diff --git a/mteval/ns_ext.cc b/mteval/ns_ext.cc index 956708af..1e7e2bc1 100644 --- a/mteval/ns_ext.cc +++ b/mteval/ns_ext.cc @@ -118,7 +118,7 @@ void ExternalMetric::ComputeSufficientStatistics(const std::vector<WordID>& hyp, } float ExternalMetric::ComputeScore(const SufficientStats& stats) const { - eval_server->ComputeScore(stats.fields); + return eval_server->ComputeScore(stats.fields); } ExternalMetric::ExternalMetric(const string& metric_name, const std::string& command) : diff --git a/mteval/ns_ter.cc b/mteval/ns_ter.cc index 680fb7b4..00b6eb01 100644 --- a/mteval/ns_ter.cc +++ b/mteval/ns_ter.cc @@ -298,7 +298,7 @@ class TERScorerImpl { } bool CalculateBestShift(const vector<WordID>& cur, - const vector<WordID>& hyp, + const vector<WordID>& /*hyp*/, float curerr, const vector<TransType>& path, vector<WordID>* new_hyp, diff --git a/mteval/scorer.h b/mteval/scorer.h index bb1e89ae..8d986612 100644 --- a/mteval/scorer.h +++ b/mteval/scorer.h @@ -103,7 +103,7 @@ class DocScorer { virtual int size() const { return scorers_.size(); } virtual ScorerP operator[](size_t i) const { return scorers_[i]; } - virtual void update(const std::string& ref) {} + virtual void update(const std::string& /*ref*/) {} private: std::vector<ScorerP> scorers_; }; @@ -124,7 +124,7 @@ class DocStreamScorer : public DocScorer { { Init(type,ref_files,src_file,verbose); } - ScorerP operator[](size_t i) const { return scorer; } + ScorerP operator[](size_t /*i*/) const { return scorer; } int size() const { return 1; } void update(const std::string& ref); private: |