Stores the features produced by any featurizer.
Initializes the Features object.
features- The features.
feature_type- Type of the feature, e.g. FEATURE_TYPE_SENTENCE.
attribute- Message attribute, e.g. INTENT or TEXT.
origin- Name of the component that created the features.
Checks if features are sparse or not.
True, if features are sparse, false otherwise.
Checks if features are dense or not.
True, if features are dense, false otherwise.
Combine the incoming features with this instance's features.
additional_features- additional features to add
Returns a 4-tuple of defining properties.
Tuple of type, attribute, features, and origin properties.
Tests if the
Feature equals to the
other- The other object.
True when the other object is a
Feature and has the same
type, attribute, and feature tensors.