|
Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
|
A class to serialize FeatureVector instances to FeatureVecMessage instances. More...
#include <feature-vector-writer.H>
Public Member Functions | |
| void | SerializeFeature (const typename FV::key_type &uid, const typename FV::mapped_type &value, FeatureMessage_FeatureType feature_type, FeatureMessage *feature_message, Symbols *symbols=NULL) const |
Serializes a single feature-value pair to a FeatureMessage. More... | |
| void | Write (const FV &features, FeatureMessage_FeatureType feature_type, FeatureVecMessage *fv_message, Symbols *symbols=NULL) const |
Serializes the specified feature vector to the specified FeatureVecMessage protocol buffer message. More... | |
A class to serialize FeatureVector instances to FeatureVecMessage instances.
| the | type of FeatureVector to write |
Definition at line 60 of file feature-vector-writer.H.
|
inline |
Serializes a single feature-value pair to a FeatureMessage.
| [in] | uid | the uid of this feature-value pair |
| [in] | value | the value of this feature-value pair |
| [in] | feature_type | the type of features contained in the specified feature vector to be serialized (specified in model.proto) |
| [out] | feature_message | the FeatureMessage instance to fill in |
| [in] | symbols | a pointer to an optional Symbols instance to be used when determining the symbol of a feature’s uid |
Definition at line 75 of file feature-vector-writer.H.
|
inline |
Serializes the specified feature vector to the specified FeatureVecMessage protocol buffer message.
| [in] | features | the feature vector to serialize |
| [in] | feature_type | the type of features contained in the specified feature vector to be serialized (specified in model.proto) |
| [out] | fv_message | the FeatureVecMessage instance to fill in with the serialized version of the specified feature vector |
| [in] | symbols | a pointer to an optional Symbols instance to be used when determining the symbol of a feature’s uid |
Definition at line 104 of file feature-vector-writer.H.
1.8.6