MLStringFeature
class NatML.Features.MLStringFeature : MLFeature, IMLCloudFeature
This feature contains plain text. It is intended for use with natural language processing (NLP) models.
Creating the Feature
From Plain Text
/// <summary>
/// Create a string feature.
/// </summary>
/// <param name="text">Text.</param>
MLStringFeature (string text);The string feature can be created from a string.
From a Cloud Feature
/// <summary>
/// Create a string feature from a cloud feature.
/// </summary>
/// <param name="feature">Cloud feature. This MUST be an `string` feature.</param>
MLStringFeature (MLCloudFeature feature);A string feature can be created from a Cloud feature. This constructor is useful for working with output prediction data from an MLCloudModel when authoring a predictor:
// Make a Cloud prediction
MLCloudModel model = ...;
MLCloudFeature[] outputFeatures = model.Predict(...);
// Create a text feature from a Cloud string feature
var feature = new MLStringFeature(outputFeatures[0]);The cloud feature MUST be a string feature.
Inspecting the String
The string feature exposes the enclosing text that it was created with.
Type Conversions
The feature type provides an implicit conversion to the string text which it contains.
Creating Cloud Features
INCOMPLETE.
Last updated
Was this helpful?