From cdb7f2b26e717bbfe84dbd73f949c6b06ca2b2d7 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 25 Nov 2013 00:14:16 -0500 Subject: remove dead code, add adagrad crf learner --- mteval/external_scorer.h | 3 ++- mteval/ns_ext.cc | 2 +- mteval/ns_ter.cc | 2 +- mteval/scorer.h | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'mteval') 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 > 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& 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& cur, - const vector& hyp, + const vector& /*hyp*/, float curerr, const vector& path, vector* 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 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: -- cgit v1.2.3