summaryrefslogtreecommitdiff
path: root/mteval
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-25 00:14:16 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-25 00:14:16 -0500
commitcdb7f2b26e717bbfe84dbd73f949c6b06ca2b2d7 (patch)
tree9d845458299fd0f16de20a0f3dbe07cf7dc3e918 /mteval
parentf2fb69b10a897e8beb4e6e6d6cbb4327096235ef (diff)
remove dead code, add adagrad crf learner
Diffstat (limited to 'mteval')
-rw-r--r--mteval/external_scorer.h3
-rw-r--r--mteval/ns_ext.cc2
-rw-r--r--mteval/ns_ter.cc2
-rw-r--r--mteval/scorer.h4
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: