diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-03-20 00:49:10 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-03-20 00:49:10 +0400 |
commit | 8987fed667c8c7cedfb714b28a061fb7b8030d6c (patch) | |
tree | 153d8406fcf4b558e952fc00b7c9a1b2403c9d49 /mert/BleuScorer.cpp | |
parent | 1678ee37695a94e237b1ca1d07a22373a0f3a0cb (diff) |
Add thread unsafe Singleton class.
- Add Vocabulary factory and the unit test.
- Remove Scorer::ClearVocabulary().
Diffstat (limited to 'mert/BleuScorer.cpp')
-rw-r--r-- | mert/BleuScorer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mert/BleuScorer.cpp b/mert/BleuScorer.cpp index cae390a18..58450cffb 100644 --- a/mert/BleuScorer.cpp +++ b/mert/BleuScorer.cpp @@ -10,6 +10,7 @@ #include "Ngram.h" #include "Reference.h" #include "Util.h" +#include "Vocabulary.h" namespace { @@ -64,7 +65,7 @@ void BleuScorer::setReferenceFiles(const vector<string>& referenceFiles) { // Make sure reference data is clear m_references.reset(); - ClearVocabulary(); + mert::VocabularyFactory::GetVocabulary()->clear(); //load reference data for (size_t i = 0; i < referenceFiles.size(); ++i) { |