Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-20 00:49:10 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-20 00:49:10 +0400
commit8987fed667c8c7cedfb714b28a061fb7b8030d6c (patch)
tree153d8406fcf4b558e952fc00b7c9a1b2403c9d49 /mert/Vocabulary.h
parent1678ee37695a94e237b1ca1d07a22373a0f3a0cb (diff)
Add thread unsafe Singleton class.
- Add Vocabulary factory and the unit test. - Remove Scorer::ClearVocabulary().
Diffstat (limited to 'mert/Vocabulary.h')
-rw-r--r--mert/Vocabulary.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/mert/Vocabulary.h b/mert/Vocabulary.h
index f9493823d..12c8c1727 100644
--- a/mert/Vocabulary.h
+++ b/mert/Vocabulary.h
@@ -64,6 +64,16 @@ class Vocabulary {
std::map<std::string, int> m_vocab;
};
+class VocabularyFactory {
+ public:
+ static Vocabulary* GetVocabulary();
+ static void SetVocabulary(Vocabulary* vocab);
+
+ private:
+ VocabularyFactory() {}
+ virtual ~VocabularyFactory() {}
+};
+
} // namespace mert
#endif // MERT_VOCABULARY_H_