summaryrefslogtreecommitdiff
path: root/mteval
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-10 13:22:23 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-10 13:22:23 -0500
commit73a5e89074c7a531caee6faa72cfd9c22dafa43e (patch)
treee7795c4e710637af708f5d2212b991e2fac0c4aa /mteval
parent5ca9348b98a519015c4080186ea1a6fe42ef4a2b (diff)
fix for mavericks
Diffstat (limited to 'mteval')
-rw-r--r--mteval/ns.cc2
-rw-r--r--mteval/scorer.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/mteval/ns.cc b/mteval/ns.cc
index b64d4798..c1ea238b 100644
--- a/mteval/ns.cc
+++ b/mteval/ns.cc
@@ -106,7 +106,7 @@ struct BleuSegmentEvaluator : public SegmentEvaluator {
}
struct NGramCompare {
- int operator() (const vector<WordID>& a, const vector<WordID>& b) {
+ int operator() (const vector<WordID>& a, const vector<WordID>& b) const {
const size_t as = a.size();
const size_t bs = b.size();
const size_t s = (as < bs ? as : bs);
diff --git a/mteval/scorer.cc b/mteval/scorer.cc
index 9eb9a76e..fedbca91 100644
--- a/mteval/scorer.cc
+++ b/mteval/scorer.cc
@@ -198,7 +198,7 @@ class BLEUScorerBase : public SentenceScorer {
virtual float ComputeRefLength(const vector<WordID>& hyp) const = 0;
private:
struct NGramCompare {
- int operator() (const vector<WordID>& a, const vector<WordID>& b) {
+ int operator() (const vector<WordID>& a, const vector<WordID>& b) const {
size_t as = a.size();
size_t bs = b.size();
const size_t s = (as < bs ? as : bs);