37 #ifndef RERANKER_PERCEPTRON_MODEL_PROTO_READER_H_
38 #define RERANKER_PERCEPTRON_MODEL_PROTO_READER_H_
40 #include "../proto/model.pb.h"
47 using confusion_learning::ModelMessage;
72 initializers.
Add(
"smart_copy", &smart_copy_);
81 virtual void Read(
const ModelMessage &model_message,
Model *model)
const;
92 const string& separator)
const;
Provides the reranker::PerceptronModel reranker class.
Model is an interface for reranking models.
virtual void ReadFeatures(istream &is, Model *model, bool skip_key, const string &separator) const
De-serializes Features from an instance.
virtual void RegisterInitializers(Initializers &initializers)
Registers the smart_copy_ data member with the name "smart_copy".
virtual void Read(const ModelMessage &model_message, Model *model) const
De-serializes a PerceptronModel instance from a ModelMessage.
virtual ~PerceptronModelProtoReader()
Destroys this reader.
void Add(const string &name, T *member, bool required=false)
De-serializer for reranker::FeatureVector instances from FeatureVecMessage instances.
A class to de-serialize a Model instance from a ModelMessage instance.
PerceptronModelProtoReader()
Constructs a new instance that can serialize Model instances to ModelMessage protocol buffer messages...
A class to construct a PerceptronModel from a ModelMessage instance.
Interface for de-serializer for reranker::Model instances from ModelMessage instances.
A class to de-serialize FeatureVector instances from FeatureVecMessage instances. ...
A container for all the member initializers for a particular Factory-constructible instance...