37 #ifndef RERANKER_PERCEPTRON_MODEL_PROTO_WRITER_H_
38 #define RERANKER_PERCEPTRON_MODEL_PROTO_WRITER_H_
40 #include "../proto/model.pb.h"
47 using confusion_learning::ModelMessage;
79 virtual void Write(
const Model *model, ModelMessage *model_message,
80 bool write_features)
const;
106 bool output_best_epoch,
109 const string separator)
const;
Provides the reranker::PerceptronModel reranker class.
Model is an interface for reranking models.
A class to serialize FeatureVector instances to FeatureVecMessage instances.
virtual void WriteFeatures(const Model *model, ostream &os, bool output_best_epoch, double weight, bool output_key, const string separator) const
Writes out the features of this model to a series of FeatureMessage instances using the specified Con...
A class to construct a ModelMessage from a Model instance.
virtual void Write(const Model *model, ModelMessage *model_message, bool write_features) const
Serializes a PerceptronModel instance to a ModelMessage.
Serializer for reranker::FeatureVector instances to FeatureVecMessage instances.
PerceptronModelProtoWriter()
Constructs a new instance that can serialize Model instances to ModelMessage protocol buffer messages...
virtual ~PerceptronModelProtoWriter()
Destroys this writer.
A class to construct a ModelMessage from a PerceptronModel instance.
Interface for serializer for reranker::Model instances to ModelMessage instances. ...