From 2a07cb6dba14931d3b29dd9a237e2838d63684c0 Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 6 Jul 2010 22:06:30 +0000 Subject: warnings git-svn-id: https://ws10smt.googlecode.com/svn/trunk@168 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/ff.cc | 2 +- decoder/ff_ruleshape.cc | 12 ++++++------ vest/scorer.cc | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/decoder/ff.cc b/decoder/ff.cc index 95bd9665..7186d776 100644 --- a/decoder/ff.cc +++ b/decoder/ff.cc @@ -59,7 +59,7 @@ void SourceWordPenalty::TraversalFeaturesImpl(const SentenceMetadata& smeta, features->set_value(fid_, edge.rule_->FWords() * value_); } -ArityPenalty::ArityPenalty(const std::string& param) : +ArityPenalty::ArityPenalty(const std::string& /* param */) : value_(-1.0 / log(10)) { string fname = "Arity_X"; for (int i = 0; i < 10; ++i) { diff --git a/decoder/ff_ruleshape.cc b/decoder/ff_ruleshape.cc index d473704a..f56ccfa9 100644 --- a/decoder/ff_ruleshape.cc +++ b/decoder/ff_ruleshape.cc @@ -14,7 +14,7 @@ inline char BitAsChar(bool bit) { return (bit ? '1' : '0'); } -RuleShapeFeatures::RuleShapeFeatures(const string& param) { +RuleShapeFeatures::RuleShapeFeatures(const string& /* param */) { bool first = true; for (int i = 0; i < 32; ++i) { for (int j = 0; j < 32; ++j) { @@ -26,7 +26,7 @@ RuleShapeFeatures::RuleShapeFeatures(const string& param) { cur = &cur->next_[bit]; os << BitAsChar(bit); } - os << "_T"; + os << "_T"; for (int k = 0; k < 5; ++k) { bool bit = IsBitSet(j,k); cur = &cur->next_[bit]; @@ -38,12 +38,12 @@ RuleShapeFeatures::RuleShapeFeatures(const string& param) { } } -void RuleShapeFeatures::TraversalFeaturesImpl(const SentenceMetadata& smeta, +void RuleShapeFeatures::TraversalFeaturesImpl(const SentenceMetadata& /* smeta */, const Hypergraph::Edge& edge, - const vector& ant_contexts, + const vector& /* ant_contexts */, SparseVector* features, - SparseVector* estimated_features, - void* context) const { + SparseVector* /* estimated_features */, + void* /* context */) const { const Node* cur = &fidtree_; TRule& rule = *edge.rule_; int pos = 0; // feature position diff --git a/vest/scorer.cc b/vest/scorer.cc index 53a17917..6c604ab8 100644 --- a/vest/scorer.cc +++ b/vest/scorer.cc @@ -226,7 +226,7 @@ class IBM_BLEUScorer : public BLEUScorerBase { int n=4) : BLEUScorerBase(references, n), lengths_(references.size()) { for (int i=0; i < references.size(); ++i) lengths_[i] = references[i].size(); - } + } protected: float ComputeRefLength(const vector& hyp) const { if (lengths_.size() == 1) return lengths_[0]; @@ -256,7 +256,7 @@ class NIST_BLEUScorer : public BLEUScorerBase { shortest_ = references[i].size(); } protected: - float ComputeRefLength(const vector& hyp) const { + float ComputeRefLength(const vector& /* hyp */) const { return shortest_; } private: @@ -273,7 +273,7 @@ class Koehn_BLEUScorer : public BLEUScorerBase { avg_ /= references.size(); } protected: - float ComputeRefLength(const vector& hyp) const { + float ComputeRefLength(const vector& /* hyp */) const { return avg_; } private: @@ -465,7 +465,7 @@ BLEUScorerBase::BLEUScorerBase(const vector >& references, CountRef(*ci); } } - + Score* BLEUScorerBase::ScoreCandidate(const vector& hyp) const { BLEUScore* bs = new BLEUScore(n_); for (NGramCountMap::iterator i=ngrams_.begin(); i != ngrams_.end(); ++i) @@ -510,7 +510,7 @@ DocScorer::DocScorer( if (!expect_eof) { assert(i == 0); expect_eof = true; - } + } break; } } else { -- cgit v1.2.3