From 4fffd2e746a4d6b643d35ae3fc4b374c770727c0 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Fri, 22 Nov 2013 14:27:29 +0100
Subject: argh, const
---
training/dtrain/score.cc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'training/dtrain/score.cc')
diff --git a/training/dtrain/score.cc b/training/dtrain/score.cc
index 96d6e10a..127f34d2 100644
--- a/training/dtrain/score.cc
+++ b/training/dtrain/score.cc
@@ -32,7 +32,7 @@ BleuScorer::Bleu(NgramCounts& counts, const unsigned hyp_len, const unsigned ref
}
score_t
-BleuScorer::Score(vector& hyp, vector& ref,
+BleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -52,7 +52,7 @@ BleuScorer::Score(vector& hyp, vector& ref,
* NOTE: 0 iff no 1gram match ('grounded')
*/
score_t
-StupidBleuScorer::Score(vector& hyp, vector& ref,
+StupidBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -81,7 +81,7 @@ StupidBleuScorer::Score(vector& hyp, vector& ref,
* (Nakov et al. '12)
*/
score_t
-FixedStupidBleuScorer::Score(vector& hyp, vector& ref,
+FixedStupidBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -112,7 +112,7 @@ FixedStupidBleuScorer::Score(vector& hyp, vector& ref,
* NOTE: max is 0.9375 (with N=4)
*/
score_t
-SmoothBleuScorer::Score(vector& hyp, vector& ref,
+SmoothBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -143,7 +143,7 @@ SmoothBleuScorer::Score(vector& hyp, vector& ref,
* sum up Ngram precisions
*/
score_t
-SumBleuScorer::Score(vector& hyp, vector& ref,
+SumBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -167,7 +167,7 @@ SumBleuScorer::Score(vector& hyp, vector& ref,
* sum up exp(Ngram precisions)
*/
score_t
-SumExpBleuScorer::Score(vector& hyp, vector& ref,
+SumExpBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -191,7 +191,7 @@ SumExpBleuScorer::Score(vector& hyp, vector& ref,
* sum up exp(weight * log(Ngram precisions))
*/
score_t
-SumWhateverBleuScorer::Score(vector& hyp, vector& ref,
+SumWhateverBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned /*rank*/, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -224,7 +224,7 @@ SumWhateverBleuScorer::Score(vector& hyp, vector& ref,
* No scaling by src len.
*/
score_t
-ApproxBleuScorer::Score(vector& hyp, vector& ref,
+ApproxBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned rank, const unsigned src_len)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
@@ -255,7 +255,7 @@ ApproxBleuScorer::Score(vector& hyp, vector& ref,
*
*/
score_t
-LinearBleuScorer::Score(vector& hyp, vector& ref,
+LinearBleuScorer::Score(const vector& hyp, const vector& ref,
const unsigned rank, const unsigned /*src_len*/)
{
unsigned hyp_len = hyp.size(), ref_len = ref.size();
--
cgit v1.2.3