summaryrefslogtreecommitdiff
path: root/training/dtrain/score.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-11-22 14:27:29 +0100
committerPatrick Simianer <p@simianer.de>2013-11-22 14:27:29 +0100
commit95a69136109665881be66ff4e8f9eca6abb08477 (patch)
tree40ec9a8dcd98641de42251b88030ff924f7566bc /training/dtrain/score.h
parent642ef236b42199c230e770a22c190836e2af0cf1 (diff)
argh, const
Diffstat (limited to 'training/dtrain/score.h')
-rw-r--r--training/dtrain/score.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/training/dtrain/score.h b/training/dtrain/score.h
index 2a49e52d..1cdd3fa9 100644
--- a/training/dtrain/score.h
+++ b/training/dtrain/score.h
@@ -144,37 +144,37 @@ struct BleuScorer : public LocalScorer
struct StupidBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {}
};
struct FixedStupidBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {}
};
struct SmoothBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {}
};
struct SumBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {}
};
struct SumExpBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {}
};
struct SumWhateverBleuScorer : public LocalScorer
{
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/);
void Reset() {};
};
@@ -194,7 +194,7 @@ struct ApproxBleuScorer : public BleuScorer
glob_hyp_len_ = glob_ref_len_ = glob_src_len_ = 0.;
}
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned rank, const unsigned src_len);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned rank, const unsigned src_len);
};
struct LinearBleuScorer : public BleuScorer
@@ -207,7 +207,7 @@ struct LinearBleuScorer : public BleuScorer
onebest_counts_.One();
}
- score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned rank, const unsigned /*src_len*/);
+ score_t Score(const vector<WordID>& hyp, const vector<WordID>& ref, const unsigned rank, const unsigned /*src_len*/);
inline void Reset() {
onebest_len_ = 1;