Uh oh! We couldn’t find any match.
Please try other search keywords.
This capsule demonstrates how to use match patterns in your actions.
Different goals for Bixby might take the same concept as an input but trigger different result views. The result views specify different match patterns.
In this sample capsule, which simulates a simple business search, there are five training samples with different goals:
Utterance | Goal |
---|---|
"call business" | CallBusiness |
"find a business" | FindBusiness |
"what are the categories" | Business#categories |
"what is the rating" | Business#rating |
"navigate there" | NavigateThere |
The FindBusiness
action simply outputs a Business
model, whose result is displayed by the Business_Result
view.
After a business is found, "what are the categories" and "what is the rating" demonstrate property projection: the goals are properties of the Business
model. This is demonstrated in the BusinessReview.dialog.bxb
and BusinessCategories.dialog.bxb
dialogs, which match on BusinessReview
and BusinessCategory
respectively, using from-property
to indicate the concepts being matched are properties of Business
.
// BusinessCategories.dialog.bxb
dialog (Result) {
match {
BusinessCategory (this) {
from-property: Business (business)
}
}
template("#{value(business.name)} has #{joinAs('value', this)}.")
}
The Business_Result_From_CallBusiness.view.bxb
and Business_Result_From_NavigateThere.view.bxb
views also use match patterns. Both match on the Business
concept, but use from-output
to specify different goals via property projection.
// Business_Result_From_NavigateThere.view.bxb
result-view {
match {
Business (business) {
from-output: NavigateThere
}
}
...
}