Skip to content

Commit

Permalink
[en] Remove the from <light> and move to sentences
Browse files Browse the repository at this point in the history
This doesn't always make sense in a sentence to allow `the` to prefix. It's not
that big of a deal, however once adding `<the>` in, it does increase the number
of matching sentences by even more. This patch can be considered an optimization
rather than a quality improvement.
  • Loading branch information
ViViDboarder committed Dec 18, 2024
1 parent 800e336 commit 962a689
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 54 deletions.
2 changes: 1 addition & 1 deletion sentences/en/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ expansion_rules:
are_any: "[<are>] <any>"
how_many: "how many [of <the>]"
brightness: "{brightness}[([ ]%)| percent]"
light: "[<the>] (light|lights|lighting|lamp|lamps)"
light: "(light|lights|lighting|lamp|lamps)"
turn: "(turn|switch|change|bring)"
temp: "(temp|temperature)"
temperature: "{temperature}[([ ]°[[ ]{temperature_unit}])|( degrees {temperature_unit})]"
Expand Down
8 changes: 4 additions & 4 deletions sentences/en/light_HassLightSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ intents:
- "[<numeric_value_set>] <area> brightness [to] <brightness>"
- "[<numeric_value_set>] <area> [to] <brightness> brightness"
- "[<numeric_value_set>] <area> [to] <brightness>"
- "[<numeric_value_set>] [all] [the] lights [<in>] <area> to <brightness> [brightness]"
- "[<numeric_value_set>] [(<all>|<the>)] <light> [<in>] <area> to <brightness> [brightness]"
response: "brightness"

- sentences:
Expand Down Expand Up @@ -78,13 +78,13 @@ intents:
domain: light
response: "color"
- sentences:
- "[<set>] [[the] color of] (<area> | [all [the]] lights in <area> | [all] <area> lights) [to] {color}"
- "[<set>] [[the] color of] (<area> | [<all>] lights in <area> | [all] <area> lights) [to] {color}"
- "[<set>] (<area> | [all] lights in <area> | [all] <area> lights) [color] [to] {color}"
response: "color"

- sentences:
- "[<set>] [[the] color of] [all] <light> [to] {color}"
- "[<set>] [[the] color of] [all] <light> (<in_here>;[to] {color})"
- "[<set>] [[the] color of] [(<all>|<the>)] <light> [to] {color}"
- "[<set>] [[the] color of] [(<all>|<the>)] <light> (<in_here>;[to] {color})"
expansion_rules:
in_here: "[in] here"
response: "color"
Expand Down
46 changes: 20 additions & 26 deletions sentences/en/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ intents:
- "<area> <light> (off|out)"
- "<light> (off|out) [in] <area>"
- "<turn> (off|out) [<all>] <area> <light>"
- "<turn> (off|out) [<all>] <light> <in> <area>"
- "<turn> (off|out) [<all>] [<the>] <light> in <area>"
- "[<turn>] [<all>] <area> <light> (off|out)"
- "[<turn>] [<all>] <light> <in> <area> (off|out)"
- "[<turn>] [<all>] <light> (off|out) <in> <area>"
- "[<turn>] [<all>] [<the>] <light> <in> <area> (off|out)"
- "[<turn>] [<all>] [<the>] <light> (off|out) <in> <area>"
- "deactivate [<all>] <area> <light>"
- "deactivate [<all>] <light> <in> <area>"
- "<turn> (off|out) [all] <light> in <area>"
- "<turn> (off|out) [all] <area> <light>"
- "[<turn>] [all] <area> <light> (off|out)"
- "[<turn>] [all] <light> [in] <area> (off|out)"
- "<light> (off|out) in <area>"
- "<area> <light> (off|out)"
- "deactivate [<all>] [<the>] <light> <in> <area>"
slots:
domain: "light"
response: "lights_area"
Expand All @@ -39,25 +33,25 @@ intents:
- "<floor> <light> (off|out)"
- "<light> (off|out) [<in>] <floor>"
- "<turn> (off|out) [<all>] <floor> <light>"
- "<turn> (off|out) [<all>] <light> [<in>] <floor>"
- "<turn> (off|out) [<all>] [<the>] <light> [<in>] <floor>"
- "[<turn>] [<all>] <floor> <light> (off|out)"
- "[<turn>] [<all>] <light> [<in>] <floor> (off|out)"
- "[<turn>] [<all>] <light> (off|out) [<in>] <floor>"
- "[<turn>] [<all>] [<the>] <light> [<in>] <floor> (off|out)"
- "[<turn>] [<all>] [<the>] <light> (off|out) [<in>] <floor>"
- "deactivate [<all>] <floor> <light>"
- "deactivate [<all>] <light> [<in>] <floor>"
- "deactivate [<all>] [<the>] <light> [<in>] <floor>"
response: "lights_floor"
slots:
domain: "light"

# Turn off all lights in the home
- sentences:
- "<turn> <all> <light> (off|out) [<everywhere>]"
- "<turn> <light> (off|out) <everywhere>"
- "<turn> [<the>] <light> (off|out) <everywhere>"
- "<turn> (off|out) <all> <light> [<everywhere>]"
- "<turn> (off|out) <light> <everywhere>"
- "<turn> (off|out) [<the>] <light> <everywhere>"
- "<turn> (off|out) [<all>] [the] <home> <light> <everywhere>"
- "deactivate <all> <light> [<everywhere>]"
- "deactivate <light> <everywhere>"
- "deactivate [<the>] <light> <everywhere>"
- "get every <light> (off|out) [<everywhere>]"
- "make sure <all> <light> <is> (off|out)"
response: "light_all"
Expand All @@ -67,17 +61,17 @@ intents:
# Turn off lights in the same area as a satellite device
- sentences:
# Explicit <here> optional all
- "<turn> [<all>] <light> (off|out) <here>"
- "<turn> [<all>] <light> <here> (off|out)"
- "<turn> (off|out) [<all>] <light> <here>"
- "deactivate [<all>] <light> <here>"
- "[<all>] <light> (off|out) <here>"
- "<turn> [<all>] [<the>] <light> (off|out) <here>"
- "<turn> [<all>] [<the>] <light> <here> (off|out)"
- "<turn> (off|out) [<all>] [<the>] <light> <here>"
- "deactivate [<all>] [<the>] <light> <here>"
- "[<all>] [<the>] <light> (off|out) <here>"

# Implicit <here> no all
- "<turn> <light> (off|out) [<here>]"
- "<turn> <light> [<here>] (off|out)"
- "<turn> (off|out) <light> [<here>]"
- "deactivate <light> [<here>]"
- "<turn> [<the>] <light> (off|out) [<here>]"
- "<turn> [<the>] <light> [<here>] (off|out)"
- "<turn> (off|out) [<the>] <light> [<here>]"
- "deactivate [<the>] <light> [<here>]"
- "<light> (off|out) [<here>]"
response: "lights_area"
slots:
Expand Down
45 changes: 22 additions & 23 deletions sentences/en/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ intents:
- "<area> <light> on"
- "<light> on [in] <area>"
- "<turn> on [<all>] <area> <light>"
- "<turn> on [<all>] <light> <in> <area>"
- "<turn> on [(<all>|<the>)] <light> <in> <area>"
- "[<turn>] [<all>] <area> <light> on"
- "[<turn>] [<all>] <light> <in> <area> on"
- "[<turn>] [<all>] <light> on <in> <area>"
- "[<turn>] [(<all>|<the>)] <light> <in> <area> on"
- "[<turn>] [(<all>|<the>)] <light> on <in> <area>"
- "activate [<all>] <area> <light>"
- "activate [<all>] <light> <in> <area>"
- "activate [(<all>|<the>)] <light> <in> <area>"
slots:
domain: "light"
response: "lights_area"
Expand All @@ -38,29 +38,28 @@ intents:
- "<floor> <light> on"
- "<light> on [<in>] <floor>"
- "<turn> on [<all>] <floor> <light>"
- "<turn> on [<all>] <light> [<in>] <floor>"
- "<turn> on [(<all>|<the>)] <light> [<in>] <floor>"
- "[<turn>] [<all>] <floor> <light> on"
- "[<turn>] [<all>] <light> [<in>] <floor> on"
- "[<turn>] [<all>] <light> on [<in>] <floor>"
- "[<turn>] [(<all>|<the>)] <light> [<in>] <floor> on"
- "[<turn>] [(<all>|<the>)] <light> on [<in>] <floor>"
- "activate [<all>] <floor> <light>"
- "activate [<all>] <light> [<in>] <floor>"
- "activate [(<all>|<the>)] <light> [<in>] <floor>"
response: "lights_floor"
slots:
domain: "light"

# Turn on all lights in the home
- sentences:
- "(light up|activate|illuminate) <all> <light> <everywhere>"
- "(light up|illuminate) the (entire|whole) <home>"
- "(light up|illuminate) <everywhere> [<everywhere>]"
- "<turn> <all> <light> on [<everywhere>]"
- "<turn> <light> on <everywhere>"
- "<turn> [<the>] <light> on <everywhere>"
- "<turn> on <all> <light> [<everywhere>]"
- "<turn> on <light> <everywhere>"
- "<turn> on [<all>] [the] <home> <light> <everywhere>"
- "<turn> on [<the>] <light> <everywhere>"
- "<turn> on [(<all>|<the>)] <home> <light> <everywhere>"
- "activate <all> <light> [<everywhere>]"
- "activate <light> <everywhere>"
- "get every <light> on [<everywhere>]"
- "activate [<the>] <light> <everywhere>"
- "get <all> <light> on [<everywhere>]"
- "illuminate <all> areas [<everywhere>]"
- make sure <all> <light> <is> on
response: "light_all"
Expand All @@ -70,17 +69,17 @@ intents:
# Turn on lights in the same area as a satellite device
- sentences:
# Explicit <here> optional all
- "<turn> [<all>] <light> on <here>"
- "<turn> [<all>] <light> <here> on"
- "<turn> on [<all>] <light> <here>"
- "activate [<all>] <light> <here>"
- "[<all>] <light> on <here>"
- "<turn> [(<all>|<the>)] <light> on <here>"
- "<turn> [(<all>|<the>)] <light> <here> on"
- "<turn> on [(<all>|<the>)] <light> <here>"
- "activate [(<all>|<the>)] <light> <here>"
- "[(<all>|<the>)] <light> on <here>"

# Implicit <here> no all
- "<turn> <light> on [<here>]"
- "<turn> <light> [<here>] on"
- "<turn> on <light> [<here>]"
- "activate <light> [<here>]"
- "<turn> [<the>] <light> on [<here>]"
- "<turn> [<the>] <light> [<here>] on"
- "<turn> on [<the>] <light> [<here>]"
- "activate [<the>] <light> [<here>]"
- "<light> on [<here>]"
- "light (it|<here>) up"
- "light up [<here>]"
Expand Down
16 changes: 16 additions & 0 deletions tests/en/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ tests:
- turn the lighting in the kitchen off
- turn the lights in kitchen off
- turn the lights in the kitchen off
- turn off my kitchen lights
- turn off our kitchen lights
- turn off all my kitchen lights
- turn off all our kitchen lights
intent:
name: HassTurnOff
slots:
Expand Down Expand Up @@ -73,6 +77,10 @@ tests:
- turn off the house lights everywhere
- turn the lights off in all the rooms
- turn the lights off in the house
- turn off all my lights
- turn off all our lights
- turn off all the lights in my home
- turn off all the lights in our home
intent:
name: HassTurnOff
slots:
Expand Down Expand Up @@ -104,6 +112,10 @@ tests:
- turn the lights in here off
- turn the lights off
- turn the lights off here
- turn off my lights here
- turn off our lights here
- turn off all the lights in my room
- turn off all the lights in our room
intent:
name: HassTurnOff
context:
Expand Down Expand Up @@ -150,6 +162,10 @@ tests:
- turn the light in the first floor off
- turn the lighting in the first floor off
- turn the lights in first floor off
- turn off my first floor lights
- turn off our first floor lights
- turn off all my first floor lights
- turn off all our first floor lights
intent:
name: HassTurnOff
slots:
Expand Down
42 changes: 42 additions & 0 deletions tests/en/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,48 @@ tests:
- sentences:
- activate living room lights
- activate the lights in the living room
- activate my lights in my living room
- can you switch on the living room lights?
- can you switch on my living room lights?
- can you turn the lights on in the living room?
- can you turn my lights on in our living room?
- could you turn on the living room lights?
- light up the living room
- light up our living room
- light up the living room for me
- light up my living room for me
- living room lighting on
- living room lights on
- living room lights on please
- please turn on the lights in the living room
- please turn on my lights in my living room
- switch on the lights in the living room
- turn all the lights in living room on
- turn all the lights in the living room on
- turn all my lights in the living room on
- turn lights in the living room on
- turn my lights in the living room on
- turn on all living room lights
- turn on all the lights in living room
- turn on all the lights in the living room
- turn on all the lights in my living room
- turn on all the living room lights
- turn on all my living room lights
- turn on living room light
- turn on living room lights
- turn on the light in living room
- turn on our light in living room
- turn on the light in the living room
- turn on the lights in living room
- turn on the lights in the living room
- turn on the lights in the living room for me
- turn on the living room light
- turn on the living room lights
- turn on my living room lights
- turn my light in living room on
- turn the light in living room on
- turn the light in the living room on
- turn the light in our living room on
- turn the lighting in the living room on
- turn the lights in living room on
- turn the living room lights on
Expand All @@ -50,18 +64,25 @@ tests:
- activate every single light
- activate lights in each room
- activate the lights in the home
- activate the lights in our home
- activate my lights in the home
- can you turn on all the lights in the house?
- illuminate all areas in the house
- illuminate the entire home
- illuminate our entire home
- light up each room in the home
- light up each room in my home
- light up the whole house
- make sure every light is on
- please activate the lights all over
- please activate our lights all over
- please turn on all the lights everywhere
- switch on all the lights in the house
- switch on all our lights in the house
- switch on every light in the home
- switch on every single light in the home
- switch on the lights in every room
- switch on my lights in every room
- turn all lighting on
- turn all lights on
- turn all lights on in the apartment
Expand All @@ -70,10 +91,15 @@ tests:
- turn on all lights in the entire home
- turn on all lights throughout the home
- turn on all the lights in the home
- turn on all my lights in my home
- turn on all my lights in the home
- turn on every light
- turn on lights in every area
- turn on my lights in every area
- turn on the house lights everywhere
- turn on my house lights everywhere
- turn the lights on in all the rooms
- turn my lights on in all my rooms
- turn the lights on in the house

intent:
Expand All @@ -84,11 +110,14 @@ tests:
# Turn on lights in the same area as a satellite device
- sentences:
- activate all the lights here
- activate all my lights here
- activate the lights
- activate my lights
- activate the lights in this room
- bring on all the lights here
- can you turn on the lights here?
- i want all the lights on in this room
- i want all my lights on in this room
- light this room up
- light up this room
- lights on
Expand All @@ -99,14 +128,17 @@ tests:
- switch on all lights in this room
- switch on each and every light in the room
- switch on the lights in this room
- switch on my lights in this room
- turn every light in here on
- turn every light on in this room
- turn on all lights here
- turn on each light in this room
- turn on the lights
- turn on my lights
- turn on the lights in this space
- turn the lights in here on
- turn the lights on
- turn my lights on
- turn the lights on here

intent:
Expand All @@ -129,6 +161,7 @@ tests:
- first floor lights on
- first floor lights on please
- light up the first floor
- light up my first floor
- light up the first floor for me
- please turn on the lights in the first floor
- switch on the lights in the first floor
Expand All @@ -137,6 +170,7 @@ tests:
- turn lights in the first floor on
- turn on all first floor lights
- turn on all the first floor lights
- turn on all my first floor lights
- turn on all the lights in first floor
- turn on all the lights in the first floor
- turn on first floor light
Expand All @@ -149,6 +183,14 @@ tests:
- turn on the lights in first floor
- turn on the lights in the first floor
- turn on the lights in the first floor for me
- turn on my first floor light
- turn on my first floor lights
- turn on my lamp in the first floor
- turn on my light in first floor
- turn on my light in the first floor
- turn on my lights in first floor
- turn on my lights in the first floor
- turn on my lights in the first floor for me
- turn the first floor lights on
- turn the light in first floor on
- turn the light in the first floor on
Expand Down

0 comments on commit 962a689

Please sign in to comment.