FoundChoice Class
- java.
lang. Object - com.
microsoft. bot. dialogs. choices. FoundChoice
- com.
public class FoundChoice
Represents a result from matching user input against a list of choices.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| FoundChoice() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| int |
getIndex()
Gets the index of the value that was matched. |
| float |
getScore()
Gets the accuracy with which the value matched the specified portion of the utterance. |
| java.lang.String |
getSynonym()
Gets the synonym that was matched. |
| java.lang.String |
getValue()
Gets the value that was matched. |
| void |
setIndex(int withIndex)
Sets the index of the value that was matched. |
| void |
setScore(float withScore)
Sets the accuracy with which the value matched the specified portion of the utterance. |
| void |
setSynonym(String withSynonym)
Sets the synonym that was matched. |
| void |
setValue(String withValue)
Sets the value that was matched. |
Methods inherited from java.lang.Object
Constructor Details
FoundChoice
public FoundChoice()
Method Details
getIndex
public int getIndex()
Gets the index of the value that was matched.
Returns:
getScore
public float getScore()
Gets the accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.
Returns:
getSynonym
public String getSynonym()
Gets the synonym that was matched. This is optional.
Returns:
getValue
public String getValue()
Gets the value that was matched.
Returns:
setIndex
public void setIndex(int withIndex)
Sets the index of the value that was matched.
Parameters:
setScore
public void setScore(float withScore)
Sets the accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.
Parameters:
setSynonym
public void setSynonym(String withSynonym)
Sets the synonym that was matched. This is optional.
Parameters:
setValue
public void setValue(String withValue)
Sets the value that was matched.
Parameters: