Skip to content

Latest commit

 

History

History
95 lines (61 loc) · 1.52 KB

Intent.md

File metadata and controls

95 lines (61 loc) · 1.52 KB

Intent

A speech intent.

public struct Intent: Hashable

An intent is part of a phrase which defines the action of the phrase, e.g. a phrase "book a restaurant and send an invitation to John" contains two intents, "book" and "send an invitation".

Intents can and should be used to dispatch the action that the user wants to do in the app (e.g. book a meeting, schedule a flight, reset the form).

Inheritance

Comparable, Hashable, Identifiable

Initializers

init(value:isFinal:)

Creates a new intent.

public init(value: String, isFinal: Bool)

Parameters

  • value: the value of the intent.
  • isFinal: the status of the intent.

Properties

Empty

An empty intent. Can be used as default value in other places.

let Empty

value

The value of the intent, as defined in Speechly application configuration. e.g. in the example *book book a [burger restaurant](restaurant_type) it would be book.

let value: String

isFinal

The status of the intent. true for finalised intents, false otherwise.

let isFinal: Bool

id

var id: String

Methods

<(lhs:rhs:)

public static func <(lhs: Intent, rhs: Intent) -> Bool

<=(lhs:rhs:)

public static func <=(lhs: Intent, rhs: Intent) -> Bool

>=(lhs:rhs:)

public static func >=(lhs: Intent, rhs: Intent) -> Bool

>(lhs:rhs:)

public static func >(lhs: Intent, rhs: Intent) -> Bool