#include <vocab.hh>
Public Member Functions | |
WriteWordsWrapper (EnumerateVocab *inner) | |
void | Add (WordIndex index, const StringPiece &str) |
const std::string & | Buffer () const |
void | Write (int fd, uint64_t start) |
Definition at line 51 of file vocab.hh.
lm::ngram::WriteWordsWrapper::WriteWordsWrapper | ( | EnumerateVocab * | inner | ) |
void lm::ngram::WriteWordsWrapper::Add | ( | WordIndex | index, | |
const StringPiece & | str | |||
) | [virtual] |
Implements lm::EnumerateVocab.
Definition at line 86 of file vocab.cc.
References lm::EnumerateVocab::Add(), StringPiece::data(), and StringPiece::size().
const std::string& lm::ngram::WriteWordsWrapper::Buffer | ( | ) | const [inline] |
void lm::ngram::WriteWordsWrapper::Write | ( | int | fd, | |
uint64_t | start | |||
) |
Definition at line 92 of file vocab.cc.
References util::SeekOrThrow(), swap(), and util::WriteOrThrow().