FindValuesOptions Class
- java.
lang. Object - com.
microsoft. bot. dialogs. choices. FindValuesOptions
- com.
public class FindValuesOptions
Contains options used to control how choices are recognized in a users utterance.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| FindValuesOptions() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean |
getAllowPartialMatches()
Gets value indicating whether only some of the tokens in a value need to exist to be considered. |
| java.lang.String |
getLocale()
Gets the locale/culture code of the utterance. |
| int |
getMaxTokenDistance()
Gets the maximum tokens allowed between two matched tokens in the utterance. |
|
Tokenizer |
getTokenizer()
Gets the tokenizer to use when parsing the utterance and values being recognized. |
| void |
setAllowPartialMatches(boolean withAllowPartialMatches)
Sets value indicating whether only some of the tokens in a value need to exist to be considered. |
| void |
setLocale(String withLocale)
Sets the locale/culture code of the utterance. |
| void |
setMaxTokenDistance(int withMaxTokenDistance)
Gets the maximum tokens allowed between two matched tokens in the utterance. |
| void |
setTokenizer(TokenizerFunction withTokenizer)
Sets the tokenizer to use when parsing the utterance and values being recognized. |
Methods inherited from java.lang.Object
Constructor Details
FindValuesOptions
public FindValuesOptions()
Method Details
getAllowPartialMatches
public boolean getAllowPartialMatches()
Gets value indicating whether only some of the tokens in a value need to exist to be considered.
Returns:
getLocale
public String getLocale()
Gets the locale/culture code of the utterance. The default is `en-US`. This is optional.
Returns:
getMaxTokenDistance
public int getMaxTokenDistance()
Gets the maximum tokens allowed between two matched tokens in the utterance. So with a max distance of 2 the value "second last" would match the utterance "second from the last" but it wouldn't match "Wait a second. That's not the last one is it?". The default value is "2".
Returns:
getTokenizer
public TokenizerFunction getTokenizer()
Gets the tokenizer to use when parsing the utterance and values being recognized.
Returns:
setAllowPartialMatches
public void setAllowPartialMatches(boolean withAllowPartialMatches)
Sets value indicating whether only some of the tokens in a value need to exist to be considered.
Parameters:
setLocale
public void setLocale(String withLocale)
Sets the locale/culture code of the utterance. The default is `en-US`. This is optional.
Parameters:
setMaxTokenDistance
public void setMaxTokenDistance(int withMaxTokenDistance)
Gets the maximum tokens allowed between two matched tokens in the utterance. So with a max distance of 2 the value "second last" would match the utterance "second from the last" but it wouldn't match "Wait a second. That's not the last one is it?". The default value is "2".
Parameters:
setTokenizer
public void setTokenizer(TokenizerFunction withTokenizer)
Sets the tokenizer to use when parsing the utterance and values being recognized.
Parameters: