diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-05 16:42:56 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-05 16:42:56 +0400 |
commit | b9f54b195aa780a482bcd9d3667140428f9aebc7 (patch) | |
tree | 34d06a65dc93a9c9cd3519735cb9c2b0faca3b63 /mert/CderScorer.cpp | |
parent | 36c17f3c933504dbb540ec318c8c6eb0554d1b87 (diff) |
implement GenerationDictionary.Load()
Diffstat (limited to 'mert/CderScorer.cpp')
-rw-r--r-- | mert/CderScorer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mert/CderScorer.cpp b/mert/CderScorer.cpp index 05c55d9ba..f06700abf 100644 --- a/mert/CderScorer.cpp +++ b/mert/CderScorer.cpp @@ -69,13 +69,10 @@ void CderScorer::prepareStatsVector(size_t sid, const string& text, vector<int>& tmp.clear(); computeCD(cand, ref, tmp); int score = calculateScore(tmp); - if (rid == 0) - { + if (rid == 0) { stats = tmp; max = score; - } - else if (score > max) - { + } else if (score > max) { stats = tmp; max = score; } @@ -103,7 +100,7 @@ void CderScorer::computeCD(const sent_t& cand, const sent_t& ref, // Initialization of first row for (int i = 0; i < I; ++i) (*row)[i] = i; - + // For CDER metric, the initialization is different if (m_allowed_long_jumps) { for (int i = 1; i < I; ++i) (*row)[i] = 1; |