#include <DocumentReader.h>
Public Member Functions | |
DocumentReader (string w_fname_) | |
virtual | ~DocumentReader () |
int | read (google::protobuf::Message *msg) |
Wrapper around protobuf messages for convenient reading of words, topics & (word,index) pairs from word, topic, dictionary dump files respectively. Assumes that each msg is in a binary file in record* format where record=(size of serialized msg,msg serialized as string)
DocumentReader::DocumentReader | ( | string | w_fname_ | ) |
Constructs a DocumentReader object to read msgs from w_fname and optionally topics from t_fname
DocumentReader::~DocumentReader | ( | ) | [virtual] |
int DocumentReader::read | ( | google::protobuf::Message * | msg | ) |
The default method to read a message from w_fname which is in (size of serialized msg,msg serialized as string)* format