Aracılığıyla paylaş


PatternMatchingIntent Class

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.intent.PatternMatchingIntent

Implements

public final class PatternMatchingIntent
implements KeyedItem

Represents a pattern matching intent used for intent recognition.

Field Summary

Modifier and Type Field and Description
java.util.Collection<java.lang.String> Phrases

Phrases and patterns that will trigger this intent.

Constructor Summary

Constructor Description
PatternMatchingIntent(String intentId)

Creates a pattern matching intent using the specified intent ID.

PatternMatchingIntent(String intentId, String[] phrases)

Creates a pattern matching intent using the specified intent ID.

PatternMatchingIntent(String intentId, Collection<String> phrases)

Creates a pattern matching intent using the specified intent ID.

Method Summary

Modifier and Type Method and Description
java.lang.String getId()

Returns the ID for this item.

void setId(String id)

Sets the ID for this item.

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

Field Details

Phrases

public Collection Phrases

Phrases and patterns that will trigger this intent. At least one phrase must exist to be able to apply this intent to an IntentRecognizer.

Constructor Details

PatternMatchingIntent

public PatternMatchingIntent(String intentId)

Creates a pattern matching intent using the specified intent ID.

Parameters:

intentId - A string that represents a unique ID for this intent.

PatternMatchingIntent

public PatternMatchingIntent(String intentId, String[] phrases)

Creates a pattern matching intent using the specified intent ID.

Parameters:

intentId - A string that represents a unique ID for this intent.
phrases - A collection of strings used to populate the intent.

PatternMatchingIntent

public PatternMatchingIntent(String intentId, Collection phrases)

Creates a pattern matching intent using the specified intent ID.

Parameters:

intentId - A string that represents a unique ID for this intent.
phrases - A collection of strings used to populate the intent.

Method Details

getId

public String getId()

Returns the ID for this item.

Returns:

The ID for this item.

setId

public void setId(String id)

Sets the ID for this item.

Parameters:

id - The ID for this item.

Applies to