summaryrefslogtreecommitdiff
path: root/mteval
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-11-28 11:11:22 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-11-28 11:11:22 +0100
commitab02696b1c104febc7f13c896acf4165f2721018 (patch)
tree61969895daa79d1d67c90f4adc1de7d91ef3cdfd /mteval
parentab63f2f2988e0093a721d0599c7fe68e183561d8 (diff)
parente346cd5cd3c5d7164819c35e485a9850d825996e (diff)
Merge branch 'master' of github.com:pks/cdec-dtrain
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: