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/BleuScorer.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/BleuScorer.cpp')
-rw-r--r-- | mert/BleuScorer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/BleuScorer.cpp b/mert/BleuScorer.cpp index e9ce2133c..09b0d292f 100644 --- a/mert/BleuScorer.cpp +++ b/mert/BleuScorer.cpp @@ -37,7 +37,7 @@ size_t BleuScorer::countNgrams(const string& line, counts_t& counts, unsigned in { vector<int> encoded_tokens; //cerr << line << endl; - encode(line,encoded_tokens); + TokenizeAndEncode(line, encoded_tokens); //copy(encoded_tokens.begin(), encoded_tokens.end(), ostream_iterator<int>(cerr," ")); //cerr << endl; for (size_t k = 1; k <= n; ++k) { @@ -70,7 +70,7 @@ void BleuScorer::setReferenceFiles(const vector<string>& referenceFiles) //make sure reference data is clear m_ref_counts.reset(); m_ref_lengths.clear(); - m_encodings.clear(); + ClearEncoder(); //load reference data for (size_t i = 0; i < referenceFiles.size(); ++i) { |