From d04c0ca2d9df0e147239b18e90650ca8bd51d594 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 18 Jan 2011 15:55:40 -0500 Subject: new version of klm --- klm/lm/vocab.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'klm/lm/vocab.hh') diff --git a/klm/lm/vocab.hh b/klm/lm/vocab.hh index bb5d789b..8c99d797 100644 --- a/klm/lm/vocab.hh +++ b/klm/lm/vocab.hh @@ -27,15 +27,18 @@ inline uint64_t HashForVocab(const StringPiece &str) { class WriteWordsWrapper : public EnumerateVocab { public: - WriteWordsWrapper(EnumerateVocab *inner, int fd); + WriteWordsWrapper(EnumerateVocab *inner); ~WriteWordsWrapper(); void Add(WordIndex index, const StringPiece &str); + void Write(int fd); + private: EnumerateVocab *inner_; - int fd_; + + std::string buffer_; }; // Vocabulary based on sorted uniform find storing only uint64_t values and using their offsets as indices. -- cgit v1.2.3