Understanding StreamResult
The StreamResult class that is provided to you from the stream provides all of the information that Communications Mining™ has extracted, here is a summary of this data - and how you can easily get it.
Properties
| Properties | Description |
|---|---|
StreamResult.Comment | This is where you can get all information about the original comment itself, without any predictions. Most of the time an automation will care most about the StreamResult.Comment.UserProperties field where you can retrieve user properties. For more details, see How do I use my StreamResult in my downstream automation? |
StreamResult.Continuation | This is the value that you can pass into the advance stream activity to advance a comment to this specific comment. For more details, see Advance Stream. |
StreamResult.Prediction | This where you can find all information about the predictions that Communications Mining™ has made. |
Helper functions
When interpreting predictions, you usually won't need to interact with these properties directly. Instead, you can easily access the data you need using one of these helper functions on the StreamResult.Prediction property:
GetLabelExtraction
GetLabelExtractions()
Returns: IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all label extractions that were predicted.
GetLeafLabelExtractionsSorted
GetLeafLabelExtractionsSorted() What's a LeafLabel?
Returns:IEnumerable<LabelExtraction> What's a LabelExtraction?
This function let’s you get a list of all label extractions that were predicted, sorted by occurrence confidence.
GetLabelExtractionsSorted
GetLabelExtractionsSorted() What's a LeafLabel?
Returns:IEnumerable<LabelExtraction> What's a LabelExtraction?
This function let’s you get a list of all label extractions that were predicted, sorted by occurrence confidence.
GetLabelExtractionsSorted
GetLabelExtractions(string labelName)
Returns:IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all label extractions that were predicted for a specific label.
GetLabelExtractionsOverOccurrenceConfidenceThreshold
GetLabelExtractionsOverOccurrenceConfidenceThreshold(string thresholdName)
Returns: IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all label extractions that have exceeded the given threshold.
The default name for a stream threshold is stream. For more details about the stream names, check Prediction thresholds.
GetLeafLabelExtractions
GetLeafLabelExtractions() What's a LeafLabel?
Returns: IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all leaf label extractions that were predicted.
Returns: IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all label extractions that were predicted for a given label and that have exceeded the given threshold.
A leaf label is a label with no children, otherwise known as a child label.
GetLeafLabelExtractionsOverOccurrenceConfidenceThreshold
GetLeafLabelExtractionsOverOccurrenceConfidenceThreshold(string thresholdName What's a LeafLabel?
Returns: IEnumerable<LabelExtraction> What's a LabelExtraction?
This function lets you get a list of all leaf label extractions that were predicted and that have exceeded the given threshold.
The default name for a stream threshold is stream. For more details about the stream names, check Prediction thresholds.
ContainsLabelExtraction
ContainsLabelExtraction(string labelName)
Returns: bool This function lets you determine whether a given label has been predicted.
This function does not take into account any thresholds that have been set.
ContainsLabelExtractionOverOccurenceThreshold
ContainsLabelExtractionOverOccurenceThreshold(string labelName, string thresholdName) Returns:bool.
This function lets you determine whether a given label has been predicted and has exceeded the given threshold.
The default name for a stream threshold is stream. For more details about the stream names, check Prediction thresholds.
GetGeneralFields
GetGeneralFields()
Returns: IEnumerable<Field>
This function lets you get a list of general fields that have been predicted.
ContainsGeneralField
ContainsGeneralField(string fieldName)
Returns: bool
This function lets you determine whether a given general field has been predicted.