diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 16:19:25 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 16:19:25 +0400 |
commit | 17e864e446a3a97f2399c4c1a7a234d6ab41e5ed (patch) | |
tree | 969878a3af3ae80fdeff8d159e373f326bd4dd8e /mert/CderScorer.cpp | |
parent | a351a74c18217915b72e2e346b14f28ace0ae3f1 (diff) |
Create private class to encapssulate encoding process.
Instead of using typedefs inside a class only,
it might be better to create a private class to do same things.
Diffstat (limited to 'mert/CderScorer.cpp')
-rw-r--r-- | mert/CderScorer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/CderScorer.cpp b/mert/CderScorer.cpp index c30558b29..fdccdcfe7 100644 --- a/mert/CderScorer.cpp +++ b/mert/CderScorer.cpp @@ -22,7 +22,7 @@ void CderScorer::setReferenceFiles(const vector<string>& referenceFiles) string line; while (getline(refin,line)) { sent_t encoded; - encode(line, encoded); + TokenizeAndEncode(line, encoded); m_ref_sentences[rid].push_back(encoded); } } @@ -31,7 +31,7 @@ void CderScorer::setReferenceFiles(const vector<string>& referenceFiles) void CderScorer::prepareStatsVector(size_t sid, const string& text, vector<int>& stats) { sent_t cand; - encode(text, cand); + TokenizeAndEncode(text, cand); float max = -2; for (size_t rid = 0; rid < m_ref_sentences.size(); ++rid) { |