Skip to content

Commit

Permalink
[en] Add alternative sentences for scenes (#1529)
Browse files Browse the repository at this point in the history
* [en] Add alternative sentences for scenes

* [en] Add common expansion rule <in> for (in|on|at)

* [en] disambiguate ordering of terms in a scene area sentence

Co-authored-by: Tudor Sandu <tm.sandu@gmail.com>

---------

Co-authored-by: Tudor Sandu <tm.sandu@gmail.com>
  • Loading branch information
tjdavey and tetele committed Sep 20, 2023
1 parent 56dfbe3 commit 1708cc1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions sentences/en/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ expansion_rules:
close: "(close|shut|lower)"
set: "(set|make|change|turn)"
numeric_value_set: "(set|change|turn|increase|decrease|make)"
in: "(in|on|at)"

# Questions
what_is_the_class_of_name: "(<what_is> the <class> (of|in|from|(indicated|measured) by) <name> [in <area>]|<what_is> <name>['s] <class> [in <area>]|<what_is> <area> <name>['s] <class>)"
Expand Down
9 changes: 9 additions & 0 deletions sentences/en/scene_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ intents:
data:
- sentences:
- "[activate|<turn>] <name> [scene] [on]"
- "(change|transition) to <name> [scene]"
requires_context:
domain: scene
slots:
domain: scene
response: scene
- sentences:
- "[activate|<turn>] <area> <name> [scene] [on]"
- "[activate|<turn>] <name> [scene] <in> <area>"
- "(change|transition) ([to] <area> <name>|<area> to <name>) [scene]"
- "(change|transition) to <name> [scene] <in> <area>"
slots:
domain: scene
response: scene
19 changes: 19 additions & 0 deletions tests/en/scene_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,28 @@ tests:
- "activate party mode scene"
- "turn party mode on"
- "party mode on"
- "change to the party mode scene"
- "transition to party mode"
intent:
name: HassTurnOn
slots:
domain: scene
name: "Party Mode"
response: "Activated"
- sentences:
- "activate kitchen party mode scene"
- "turn kitchen party mode on"
- "activate party mode in the kitchen"
- "activate party mode at the Kitchen"
- "kitchen party mode on"
- "change kitchen to the party mode scene"
- "transition to the kitchen party mode"
- "change to party mode at the kitchen"
- "transition to party mode in kitchen"
intent:
name: HassTurnOn
slots:
area: Kitchen
domain: scene
name: "Party Mode"
response: "Activated"

0 comments on commit 1708cc1

Please sign in to comment.