#include <DocumentWriter.h>
Public Member Functions | |
DocumentWriter (string w_fname_) | |
virtual | ~DocumentWriter () |
bool | write (const google::protobuf::Message &msg) |
Wrapper around protobuf msgs for convenient writing of words, topics & (word,index) pairs into word, topic, dictionary dump files respectively. Each msg is written into a binary file in record* format where record=(size of serialized msg,msg serialized as string)
DocumentWriter::DocumentWriter | ( | string | w_fname_ | ) |
Constructs a DocumentWriter object to write msgs into w_fname and optionally topics to t_fname. You can however choose to ignore the words file if you want to write only topics by setting w_fname_="" & using write_topics() method.
DocumentWriter::~DocumentWriter | ( | ) | [virtual] |
bool DocumentWriter::write | ( | const google::protobuf::Message & | msg | ) |
The default method to write a message to w_fname in (size of serialized msg,msg serialized as string)* format