RecognizerResult Class
- java.
lang. Object - com.
microsoft. bot. builder. RecognizerResult
- com.
Implements
public class RecognizerResult
implements RecognizerConvert
Contains recognition results generated by an Recognizer.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| RecognizerResult() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void |
convert(Object result)
Convert recognizer result. |
| java.lang.String |
getAlteredText()
Gets the input text as modified by the recognizer, for example for spelling correction. |
| com.fasterxml.jackson.databind.JsonNode |
getEntities()
Gets the recognized top-level entities. |
|
java.util.Map<java.lang.String,Intent |
getIntents()
Gets the recognized intents, with the intent as key and the confidence as value. |
| java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> |
getProperties()
Gets properties that are not otherwise defined by the Recognizer |
| java.lang.String |
getText()
Gets the input text to recognize. |
|
Named |
getTopScoringIntent()
Return the top scoring intent and its score. |
| void |
setAlteredText(String withAlteredText)
Sets the input text as modified by the recognizer, for example for spelling correction. |
| void |
setEntities(JsonNode withEntities)
Sets the recognized top-level entities. |
| void |
setIntents(Map<String,IntentScore> withIntents)
Sets the recognized intents, with the intent as key and the confidence as value. |
| void |
setProperties(String key, JsonNode value)
Sets properties that are not otherwise defined by the Recognizer |
| void |
setText(String withText)
Sets the input text to recognize. |
Methods inherited from java.lang.Object
Constructor Details
RecognizerResult
public RecognizerResult()
Method Details
convert
public void convert(Object result)
Convert recognizer result.
Parameters:
getAlteredText
public String getAlteredText()
Gets the input text as modified by the recognizer, for example for spelling correction.
Returns:
getEntities
public JsonNode getEntities()
Gets the recognized top-level entities.
Returns:
getIntents
public Map
Gets the recognized intents, with the intent as key and the confidence as value.
Returns:
getProperties
public Map
Gets properties that are not otherwise defined by the RecognizerResult type but that might appear in the REST JSON object.
Returns:
getText
public String getText()
Gets the input text to recognize.
Returns:
getTopScoringIntent
public RecognizerResult.NamedIntentScore getTopScoringIntent()
Return the top scoring intent and its score.
Returns:
Throws:
setAlteredText
public void setAlteredText(String withAlteredText)
Sets the input text as modified by the recognizer, for example for spelling correction.
Parameters:
setEntities
public void setEntities(JsonNode withEntities)
Sets the recognized top-level entities.
Parameters:
setIntents
public void setIntents(Map
Sets the recognized intents, with the intent as key and the confidence as value.
Parameters:
setProperties
public void setProperties(String key, JsonNode value)
Sets properties that are not otherwise defined by the RecognizerResult type but that might appear in the REST JSON object.
With this, properties not represented in the defined type are not dropped when the JSON object is deserialized, but are instead stored in this property. Such properties will be written to a JSON object when the instance is serialized.
Parameters:
setText
public void setText(String withText)
Sets the input text to recognize.
Parameters: