FindValuesOptions Class

  • java.lang.Object
    • com.microsoft.bot.dialogs.choices.FindValuesOptions

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.

TokenizerFunction 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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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:

true if only some of the tokens in a value need to exist to be considered; otherwise false.

getLocale

public String getLocale()

Gets the locale/culture code of the utterance. The default is `en-US`. This is optional.

Returns:

The locale/culture code of the utterance.

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:

The maximum tokens allowed between two matched tokens in the utterance.

getTokenizer

public TokenizerFunction getTokenizer()

Gets the tokenizer to use when parsing the utterance and values being recognized.

Returns:

The tokenizer to use when parsing the utterance and values being recognized.

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:

withAllowPartialMatches - true if only some of the tokens in a value need to exist to be considered; otherwise false.

setLocale

public void setLocale(String withLocale)

Sets the locale/culture code of the utterance. The default is `en-US`. This is optional.

Parameters:

withLocale - The locale/culture code of the utterance.

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:

withMaxTokenDistance - The maximum tokens allowed between two matched tokens in the utterance.

setTokenizer

public void setTokenizer(TokenizerFunction withTokenizer)

Sets the tokenizer to use when parsing the utterance and values being recognized.

Parameters:

withTokenizer - The tokenizer to use when parsing the utterance and values being recognized.

Applies to