Skip to content

Commit 7c8cb25

Browse files
committed
[en] Remove the from <light> and move to sentences
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.
1 parent fd7a5be commit 7c8cb25

File tree

6 files changed

+105
-54
lines changed

6 files changed

+105
-54
lines changed

sentences/en/_common.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ expansion_rules:
380380
are_any: "[<are>] <any>"
381381
how_many: "how many [of <the>]"
382382
brightness: "{brightness}[([ ]%)| percent]"
383-
light: "[<the>] (light|lights|lighting|lamp|lamps)"
383+
light: "(light|lights|lighting|lamp|lamps)"
384384
turn: "(turn|switch|change|bring)"
385385
temp: "(temp|temperature)"
386386
temperature: "{temperature}[([ ]°[[ ]{temperature_unit}])|( degrees {temperature_unit})]"

sentences/en/light_HassLightSet.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ intents:
2222
- "[<numeric_value_set>] <area> brightness [to] <brightness>"
2323
- "[<numeric_value_set>] <area> [to] <brightness> brightness"
2424
- "[<numeric_value_set>] <area> [to] <brightness>"
25-
- "[<numeric_value_set>] [all] [the] lights [<in>] <area> to <brightness> [brightness]"
25+
- "[<numeric_value_set>] [(<all>|<the>)] <light> [<in>] <area> to <brightness> [brightness]"
2626
response: "brightness"
2727

2828
- sentences:
@@ -78,13 +78,13 @@ intents:
7878
domain: light
7979
response: "color"
8080
- sentences:
81-
- "[<set>] [[the] color of] (<area> | [all [the]] lights in <area> | [all] <area> lights) [to] {color}"
81+
- "[<set>] [[the] color of] (<area> | [<all>] lights in <area> | [all] <area> lights) [to] {color}"
8282
- "[<set>] (<area> | [all] lights in <area> | [all] <area> lights) [color] [to] {color}"
8383
response: "color"
8484

8585
- sentences:
86-
- "[<set>] [[the] color of] [all] <light> [to] {color}"
87-
- "[<set>] [[the] color of] [all] <light> (<in_here>;[to] {color})"
86+
- "[<set>] [[the] color of] [(<all>|<the>)] <light> [to] {color}"
87+
- "[<set>] [[the] color of] [(<all>|<the>)] <light> (<in_here>;[to] {color})"
8888
expansion_rules:
8989
in_here: "[in] here"
9090
response: "color"

sentences/en/light_HassTurnOff.yaml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,12 @@ intents:
1818
- "<area> <light> (off|out)"
1919
- "<light> (off|out) [in] <area>"
2020
- "<turn> (off|out) [<all>] <area> <light>"
21-
- "<turn> (off|out) [<all>] <light> <in> <area>"
21+
- "<turn> (off|out) [(<all>|<the>)] <light> in <area>"
2222
- "[<turn>] [<all>] <area> <light> (off|out)"
23-
- "[<turn>] [<all>] <light> <in> <area> (off|out)"
24-
- "[<turn>] [<all>] <light> (off|out) <in> <area>"
23+
- "[<turn>] [(<all>|<the>)] <light> <in> <area> (off|out)"
24+
- "[<turn>] [(<all>|<the>)] <light> (off|out) <in> <area>"
2525
- "deactivate [<all>] <area> <light>"
26-
- "deactivate [<all>] <light> <in> <area>"
27-
- "<turn> (off|out) [all] <light> in <area>"
28-
- "<turn> (off|out) [all] <area> <light>"
29-
- "[<turn>] [all] <area> <light> (off|out)"
30-
- "[<turn>] [all] <light> [in] <area> (off|out)"
31-
- "<light> (off|out) in <area>"
32-
- "<area> <light> (off|out)"
26+
- "deactivate [(<all>|<the>)] <light> <in> <area>"
3327
slots:
3428
domain: "light"
3529
response: "lights_area"
@@ -39,25 +33,25 @@ intents:
3933
- "<floor> <light> (off|out)"
4034
- "<light> (off|out) [<in>] <floor>"
4135
- "<turn> (off|out) [<all>] <floor> <light>"
42-
- "<turn> (off|out) [<all>] <light> [<in>] <floor>"
36+
- "<turn> (off|out) [(<all>|<the>)] <light> [<in>] <floor>"
4337
- "[<turn>] [<all>] <floor> <light> (off|out)"
44-
- "[<turn>] [<all>] <light> [<in>] <floor> (off|out)"
45-
- "[<turn>] [<all>] <light> (off|out) [<in>] <floor>"
38+
- "[<turn>] [(<all>|<the>)] <light> [<in>] <floor> (off|out)"
39+
- "[<turn>] [(<all>|<the>)] <light> (off|out) [<in>] <floor>"
4640
- "deactivate [<all>] <floor> <light>"
47-
- "deactivate [<all>] <light> [<in>] <floor>"
41+
- "deactivate [(<all>|<the>)] <light> [<in>] <floor>"
4842
response: "lights_floor"
4943
slots:
5044
domain: "light"
5145

5246
# Turn off all lights in the home
5347
- sentences:
5448
- "<turn> <all> <light> (off|out) [<everywhere>]"
55-
- "<turn> <light> (off|out) <everywhere>"
49+
- "<turn> [<the>] <light> (off|out) <everywhere>"
5650
- "<turn> (off|out) <all> <light> [<everywhere>]"
57-
- "<turn> (off|out) <light> <everywhere>"
51+
- "<turn> (off|out) [<the>] <light> <everywhere>"
5852
- "<turn> (off|out) [<all>] [the] <home> <light> <everywhere>"
5953
- "deactivate <all> <light> [<everywhere>]"
60-
- "deactivate <light> <everywhere>"
54+
- "deactivate [<the>] <light> <everywhere>"
6155
- "get every <light> (off|out) [<everywhere>]"
6256
- "make sure <all> <light> <is> (off|out)"
6357
response: "light_all"
@@ -67,17 +61,17 @@ intents:
6761
# Turn off lights in the same area as a satellite device
6862
- sentences:
6963
# Explicit <here> optional all
70-
- "<turn> [<all>] <light> (off|out) <here>"
71-
- "<turn> [<all>] <light> <here> (off|out)"
72-
- "<turn> (off|out) [<all>] <light> <here>"
73-
- "deactivate [<all>] <light> <here>"
74-
- "[<all>] <light> (off|out) <here>"
64+
- "<turn> [(<all>|<the>)] <light> (off|out) <here>"
65+
- "<turn> [(<all>|<the>)] <light> <here> (off|out)"
66+
- "<turn> (off|out) [(<all>|<the>)] <light> <here>"
67+
- "deactivate [(<all>|<the>)] <light> <here>"
68+
- "[<all>] [<the>] <light> (off|out) <here>"
7569

7670
# Implicit <here> no all
77-
- "<turn> <light> (off|out) [<here>]"
78-
- "<turn> <light> [<here>] (off|out)"
79-
- "<turn> (off|out) <light> [<here>]"
80-
- "deactivate <light> [<here>]"
71+
- "<turn> [<the>] <light> (off|out) [<here>]"
72+
- "<turn> [<the>] <light> [<here>] (off|out)"
73+
- "<turn> (off|out) [<the>] <light> [<here>]"
74+
- "deactivate [<the>] <light> [<here>]"
8175
- "<light> (off|out) [<here>]"
8276
response: "lights_area"
8377
slots:

sentences/en/light_HassTurnOn.yaml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ intents:
2222
- "<area> <light> on"
2323
- "<light> on [in] <area>"
2424
- "<turn> on [<all>] <area> <light>"
25-
- "<turn> on [<all>] <light> <in> <area>"
25+
- "<turn> on [(<all>|<the>)] <light> <in> <area>"
2626
- "[<turn>] [<all>] <area> <light> on"
27-
- "[<turn>] [<all>] <light> <in> <area> on"
28-
- "[<turn>] [<all>] <light> on <in> <area>"
27+
- "[<turn>] [(<all>|<the>)] <light> <in> <area> on"
28+
- "[<turn>] [(<all>|<the>)] <light> on <in> <area>"
2929
- "activate [<all>] <area> <light>"
30-
- "activate [<all>] <light> <in> <area>"
30+
- "activate [(<all>|<the>)] <light> <in> <area>"
3131
slots:
3232
domain: "light"
3333
response: "lights_area"
@@ -38,29 +38,28 @@ intents:
3838
- "<floor> <light> on"
3939
- "<light> on [<in>] <floor>"
4040
- "<turn> on [<all>] <floor> <light>"
41-
- "<turn> on [<all>] <light> [<in>] <floor>"
41+
- "<turn> on [(<all>|<the>)] <light> [<in>] <floor>"
4242
- "[<turn>] [<all>] <floor> <light> on"
43-
- "[<turn>] [<all>] <light> [<in>] <floor> on"
44-
- "[<turn>] [<all>] <light> on [<in>] <floor>"
43+
- "[<turn>] [(<all>|<the>)] <light> [<in>] <floor> on"
44+
- "[<turn>] [(<all>|<the>)] <light> on [<in>] <floor>"
4545
- "activate [<all>] <floor> <light>"
46-
- "activate [<all>] <light> [<in>] <floor>"
46+
- "activate [(<all>|<the>)] <light> [<in>] <floor>"
4747
response: "lights_floor"
4848
slots:
4949
domain: "light"
5050

5151
# Turn on all lights in the home
5252
- sentences:
5353
- "(light up|activate|illuminate) <all> <light> <everywhere>"
54-
- "(light up|illuminate) the (entire|whole) <home>"
5554
- "(light up|illuminate) <everywhere> [<everywhere>]"
5655
- "<turn> <all> <light> on [<everywhere>]"
57-
- "<turn> <light> on <everywhere>"
56+
- "<turn> [<the>] <light> on <everywhere>"
5857
- "<turn> on <all> <light> [<everywhere>]"
59-
- "<turn> on <light> <everywhere>"
60-
- "<turn> on [<all>] [the] <home> <light> <everywhere>"
58+
- "<turn> on [<the>] <light> <everywhere>"
59+
- "<turn> on [(<all>|<the>)] <home> <light> <everywhere>"
6160
- "activate <all> <light> [<everywhere>]"
62-
- "activate <light> <everywhere>"
63-
- "get every <light> on [<everywhere>]"
61+
- "activate [<the>] <light> <everywhere>"
62+
- "get <all> <light> on [<everywhere>]"
6463
- "illuminate <all> areas [<everywhere>]"
6564
- make sure <all> <light> <is> on
6665
response: "light_all"
@@ -70,17 +69,17 @@ intents:
7069
# Turn on lights in the same area as a satellite device
7170
- sentences:
7271
# Explicit <here> optional all
73-
- "<turn> [<all>] <light> on <here>"
74-
- "<turn> [<all>] <light> <here> on"
75-
- "<turn> on [<all>] <light> <here>"
76-
- "activate [<all>] <light> <here>"
77-
- "[<all>] <light> on <here>"
72+
- "<turn> [(<all>|<the>)] <light> on <here>"
73+
- "<turn> [(<all>|<the>)] <light> <here> on"
74+
- "<turn> on [(<all>|<the>)] <light> <here>"
75+
- "activate [(<all>|<the>)] <light> <here>"
76+
- "[(<all>|<the>)] <light> on <here>"
7877

7978
# Implicit <here> no all
80-
- "<turn> <light> on [<here>]"
81-
- "<turn> <light> [<here>] on"
82-
- "<turn> on <light> [<here>]"
83-
- "activate <light> [<here>]"
79+
- "<turn> [<the>] <light> on [<here>]"
80+
- "<turn> [<the>] <light> [<here>] on"
81+
- "<turn> on [<the>] <light> [<here>]"
82+
- "activate [<the>] <light> [<here>]"
8483
- "<light> on [<here>]"
8584
- "light (it|<here>) up"
8685
- "light up [<here>]"

tests/en/light_HassTurnOff.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ tests:
3737
- turn the lighting in the kitchen off
3838
- turn the lights in kitchen off
3939
- turn the lights in the kitchen off
40+
- turn off my kitchen lights
41+
- turn off our kitchen lights
42+
- turn off all my kitchen lights
43+
- turn off all our kitchen lights
4044
intent:
4145
name: HassTurnOff
4246
slots:
@@ -73,6 +77,10 @@ tests:
7377
- turn off the house lights everywhere
7478
- turn the lights off in all the rooms
7579
- turn the lights off in the house
80+
- turn off all my lights
81+
- turn off all our lights
82+
- turn off all the lights in my home
83+
- turn off all the lights in our home
7684
intent:
7785
name: HassTurnOff
7886
slots:
@@ -104,6 +112,10 @@ tests:
104112
- turn the lights in here off
105113
- turn the lights off
106114
- turn the lights off here
115+
- turn off my lights here
116+
- turn off our lights here
117+
- turn off all the lights in my room
118+
- turn off all the lights in our room
107119
intent:
108120
name: HassTurnOff
109121
context:
@@ -150,6 +162,10 @@ tests:
150162
- turn the light in the first floor off
151163
- turn the lighting in the first floor off
152164
- turn the lights in first floor off
165+
- turn off my first floor lights
166+
- turn off our first floor lights
167+
- turn off all my first floor lights
168+
- turn off all our first floor lights
153169
intent:
154170
name: HassTurnOff
155171
slots:

tests/en/light_HassTurnOn.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,48 @@ tests:
44
- sentences:
55
- activate living room lights
66
- activate the lights in the living room
7+
- activate my lights in my living room
78
- can you switch on the living room lights?
9+
- can you switch on my living room lights?
810
- can you turn the lights on in the living room?
11+
- can you turn my lights on in our living room?
912
- could you turn on the living room lights?
1013
- light up the living room
14+
- light up our living room
1115
- light up the living room for me
16+
- light up my living room for me
1217
- living room lighting on
1318
- living room lights on
1419
- living room lights on please
1520
- please turn on the lights in the living room
21+
- please turn on my lights in my living room
1622
- switch on the lights in the living room
1723
- turn all the lights in living room on
1824
- turn all the lights in the living room on
25+
- turn all my lights in the living room on
1926
- turn lights in the living room on
27+
- turn my lights in the living room on
2028
- turn on all living room lights
2129
- turn on all the lights in living room
2230
- turn on all the lights in the living room
31+
- turn on all the lights in my living room
2332
- turn on all the living room lights
33+
- turn on all my living room lights
2434
- turn on living room light
2535
- turn on living room lights
2636
- turn on the light in living room
37+
- turn on our light in living room
2738
- turn on the light in the living room
2839
- turn on the lights in living room
2940
- turn on the lights in the living room
3041
- turn on the lights in the living room for me
3142
- turn on the living room light
3243
- turn on the living room lights
44+
- turn on my living room lights
45+
- turn my light in living room on
3346
- turn the light in living room on
3447
- turn the light in the living room on
48+
- turn the light in our living room on
3549
- turn the lighting in the living room on
3650
- turn the lights in living room on
3751
- turn the living room lights on
@@ -50,18 +64,25 @@ tests:
5064
- activate every single light
5165
- activate lights in each room
5266
- activate the lights in the home
67+
- activate the lights in our home
68+
- activate my lights in the home
5369
- can you turn on all the lights in the house?
5470
- illuminate all areas in the house
5571
- illuminate the entire home
72+
- illuminate our entire home
5673
- light up each room in the home
74+
- light up each room in my home
5775
- light up the whole house
5876
- make sure every light is on
5977
- please activate the lights all over
78+
- please activate our lights all over
6079
- please turn on all the lights everywhere
6180
- switch on all the lights in the house
81+
- switch on all our lights in the house
6282
- switch on every light in the home
6383
- switch on every single light in the home
6484
- switch on the lights in every room
85+
- switch on my lights in every room
6586
- turn all lighting on
6687
- turn all lights on
6788
- turn all lights on in the apartment
@@ -70,10 +91,15 @@ tests:
7091
- turn on all lights in the entire home
7192
- turn on all lights throughout the home
7293
- turn on all the lights in the home
94+
- turn on all my lights in my home
95+
- turn on all my lights in the home
7396
- turn on every light
7497
- turn on lights in every area
98+
- turn on my lights in every area
7599
- turn on the house lights everywhere
100+
- turn on my house lights everywhere
76101
- turn the lights on in all the rooms
102+
- turn my lights on in all my rooms
77103
- turn the lights on in the house
78104

79105
intent:
@@ -84,11 +110,14 @@ tests:
84110
# Turn on lights in the same area as a satellite device
85111
- sentences:
86112
- activate all the lights here
113+
- activate all my lights here
87114
- activate the lights
115+
- activate my lights
88116
- activate the lights in this room
89117
- bring on all the lights here
90118
- can you turn on the lights here?
91119
- i want all the lights on in this room
120+
- i want all my lights on in this room
92121
- light this room up
93122
- light up this room
94123
- lights on
@@ -99,14 +128,17 @@ tests:
99128
- switch on all lights in this room
100129
- switch on each and every light in the room
101130
- switch on the lights in this room
131+
- switch on my lights in this room
102132
- turn every light in here on
103133
- turn every light on in this room
104134
- turn on all lights here
105135
- turn on each light in this room
106136
- turn on the lights
137+
- turn on my lights
107138
- turn on the lights in this space
108139
- turn the lights in here on
109140
- turn the lights on
141+
- turn my lights on
110142
- turn the lights on here
111143

112144
intent:
@@ -129,6 +161,7 @@ tests:
129161
- first floor lights on
130162
- first floor lights on please
131163
- light up the first floor
164+
- light up my first floor
132165
- light up the first floor for me
133166
- please turn on the lights in the first floor
134167
- switch on the lights in the first floor
@@ -137,6 +170,7 @@ tests:
137170
- turn lights in the first floor on
138171
- turn on all first floor lights
139172
- turn on all the first floor lights
173+
- turn on all my first floor lights
140174
- turn on all the lights in first floor
141175
- turn on all the lights in the first floor
142176
- turn on first floor light
@@ -149,6 +183,14 @@ tests:
149183
- turn on the lights in first floor
150184
- turn on the lights in the first floor
151185
- turn on the lights in the first floor for me
186+
- turn on my first floor light
187+
- turn on my first floor lights
188+
- turn on my lamp in the first floor
189+
- turn on my light in first floor
190+
- turn on my light in the first floor
191+
- turn on my lights in first floor
192+
- turn on my lights in the first floor
193+
- turn on my lights in the first floor for me
152194
- turn the first floor lights on
153195
- turn the light in first floor on
154196
- turn the light in the first floor on

0 commit comments

Comments
 (0)