Class PatternMatchingIntent

  • All Implemented Interfaces:
    KeyedItem

    public final class PatternMatchingIntent
    extends Object
    implements KeyedItem
    Represents a pattern matching intent used for intent recognition.
    • Field Detail

      • Phrases

        public Collection<String> 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 Detail

      • 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,
                                     Collection<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,
                                     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.
    • Method Detail

      • getId

        public String getId()
        Returns the ID for this item.
        Specified by:
        getId in interface KeyedItem
        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.