PatternMatchingEntity Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. intent. PatternMatchingEntity
- com.
Implements
public class PatternMatchingEntity
implements KeyedItem
Represents a pattern matching entity used for intent recognition.
Field Summary
Modifier and Type | Field and Description |
---|---|
java.util.Collection<java.lang.String> |
Phrases
A collection of strings used to match the entity for List type entities. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Pattern |
CreateAnyEntity(String entityId)
Creates a pattern matching entity using the specified intent ID. |
static
Pattern |
CreateIntegerEntity(String entityId)
Creates a pattern matching entity using the specified intent ID. |
static
Pattern |
CreateListEntity(String entityId, PatternMatchingEntity.EntityMatchMode mode, String[] phrases)
Creates a pattern matching entity using the specified intent ID, Entity |
static
Pattern |
CreateListEntity(String entityId, PatternMatchingEntity.EntityMatchMode mode, Collection<String> phrases)
Creates a pattern matching entity using the specified intent ID, Entity |
java.lang.String |
getId()
Returns the ID for this item. |
Entity |
getMatchMode()
Returns the |
Entity |
getType()
Returns the |
void |
setId(String id)
Sets the ID for this item. |
void |
setMatchMode(PatternMatchingEntity.EntityMatchMode mode)
Sets the |
void |
setType(PatternMatchingEntity.EntityType type)
Sets the |
Methods inherited from java.lang.Object
Field Details
Phrases
public Collection
A collection of strings used to match the entity for List type entities. Strict Mode means the entity must appear in the list.
Method Details
CreateAnyEntity
public static PatternMatchingEntity CreateAnyEntity(String entityId)
Creates a pattern matching entity using the specified intent ID.
Parameters:
Returns:
CreateIntegerEntity
public static PatternMatchingEntity CreateIntegerEntity(String entityId)
Creates a pattern matching entity using the specified intent ID. The PrebuiltInteger Entity will match words representing numbers in lexical, digit, and ordinal formats.
Parameters:
Returns:
CreateListEntity
public static PatternMatchingEntity CreateListEntity(String entityId, PatternMatchingEntity.EntityMatchMode mode, String[] phrases)
Creates a pattern matching entity using the specified intent ID, EntityMatchMode, phrases. This entity type will match based on the phrases provided.
Parameters:
EntityMatchMode
for the List entity. Strict means the
captured entity must appear in the phrases list.
Returns:
CreateListEntity
public static PatternMatchingEntity CreateListEntity(String entityId, PatternMatchingEntity.EntityMatchMode mode, Collection
Creates a pattern matching entity using the specified intent ID, EntityMatchMode, phrases. This entity type will match based on the phrases provided.
Parameters:
EntityMatchMode
for the List entity. Strict means the
captured entity must appear in the phrases list.
Returns:
getId
public String getId()
Returns the ID for this item. This will be used to retrieve the entity if it is included in the IntentRecognitionResult.
Returns:
getMatchMode
public PatternMatchingEntity.EntityMatchMode getMatchMode()
Returns the EntityMatchMode
for this item.
Returns:
EntityMatchMode
for this item.getType
public PatternMatchingEntity.EntityType getType()
Returns the EntityType
for this item.
Returns:
EntityType
for this item.setId
public void setId(String id)
Sets the ID for this item. This will be used to retrieve the entity if it is included in the IntentRecognitionResult.
Parameters:
setMatchMode
public void setMatchMode(PatternMatchingEntity.EntityMatchMode mode)
Sets the EntityMatchMode
for this item.
Parameters:
EntityMatchMode
for this item.
setType
public void setType(PatternMatchingEntity.EntityType type)
Sets the EntityType
for this item.
Parameters:
EntityType
for this item.
Applies to
Azure SDK for Java