ChoiceRecognizers Class

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

public final class ChoiceRecognizers

Contains methods for matching user input against a list of choices.

Method Summary

Modifier and Type Method and Description
static java.util.List<ModelResult<FoundChoice>> recognizeChoices(String utterance, List<Choice> choices)

Matches user input against a list of choices.

static java.util.List<ModelResult<FoundChoice>> recognizeChoices(String utterance, List<Choice> choices, FindChoicesOptions options)

Matches user input against a list of choices.

static java.util.List<ModelResult<FoundChoice>> recognizeChoicesFromStrings(String utterance, List<String> choices)

Matches user input against a list of choices.

static java.util.List<ModelResult<FoundChoice>> recognizeChoicesFromStrings(String utterance, List<String> choices, FindChoicesOptions options)

Matches user input against a list of choices.

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

Method Details

recognizeChoices

public static List> recognizeChoices(String utterance, List choices)

Matches user input against a list of choices.

Parameters:

utterance - The input.
choices - The list of string choices.

Returns:

A list of found choices, sorted by most relevant first.

recognizeChoices

public static List> recognizeChoices(String utterance, List choices, FindChoicesOptions options)

Matches user input against a list of choices.

Parameters:

utterance - The input.
choices - The list of string choices.
options - Optional, options to control the recognition strategy.

Returns:

A list of found choices, sorted by most relevant first.

recognizeChoicesFromStrings

public static List> recognizeChoicesFromStrings(String utterance, List choices)

Matches user input against a list of choices.

Parameters:

utterance - The input.
choices - The list of string choices.

Returns:

A list of found choices, sorted by most relevant first.

recognizeChoicesFromStrings

public static List> recognizeChoicesFromStrings(String utterance, List choices, FindChoicesOptions options)

Matches user input against a list of choices.

Parameters:

utterance - The input.
choices - The list of string choices.
options - Optional, options to control the recognition strategy.

Returns:

A list of found choices, sorted by most relevant first.

Applies to