Understanding LabelExtraction
The label extraction class is returned by many of the helper functions that a Stream Prediction returns, and represents a single extraction that the platform has made. This section contains a summary of what data it contains.For more details, see The anatomy of an extraction.
Properties
| Property | Description |
|---|---|
LabelExtraction.Name | The extraction's name indicates its primary topic. For example, an extraction could be called "Address Change" to signify that its main focus is on changing addresses. |
LabelExtraction.OccurenceConfidence | This is the confidence value associated with the extraction. |
LabelExtraction.Fields | This is the list of fields that have been extracted for the current extraction. |
Helper functions
Just like withthe StreamResult class, you typically won't need to interact with these properties directly. There are a set of helper functions that make it easy to access the data you need:
FieldExists
FieldExists(string name)
Returns: bool
This function lets you determine whether a given field exists for the current extraction.
GetFieldValue
GetFieldValue(string name)
Returns: string
This function returns the value for the given field.
If the field does not exist, then an empty string will be returned.
GetField
GetField(string name)
Returns: Field.
This function returns the field with the given name
Most of the time you want to use GetFieldValue instead.