From f1976decb5614146f60aa923a2484a2873736d2a Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 8 Jan 2025 06:41:43 -0800 Subject: [PATCH] [En] remove `the` from `` (#2728) * [en] Remove `the` from `` 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 `` in, it does increase the number of matching sentences by even more. This patch can be considered an optimization rather than a quality improvement. --- sentences/en/_common.yaml | 2 +- sentences/en/light_HassLightSet.yaml | 8 ++--- sentences/en/light_HassTurnOff.yaml | 48 ++++++++++++---------------- sentences/en/light_HassTurnOn.yaml | 45 +++++++++++++------------- tests/en/light_HassTurnOff.yaml | 16 ++++++++++ tests/en/light_HassTurnOn.yaml | 42 ++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 55 deletions(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index e603d31de8..ee429cd520 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -380,7 +380,7 @@ expansion_rules: are_any: "[] " how_many: "how many [of ]" brightness: "{brightness}[([ ]%)| percent]" - light: "[] (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})]" diff --git a/sentences/en/light_HassLightSet.yaml b/sentences/en/light_HassLightSet.yaml index a67063cfee..6ef1659466 100644 --- a/sentences/en/light_HassLightSet.yaml +++ b/sentences/en/light_HassLightSet.yaml @@ -22,7 +22,7 @@ intents: - "[] brightness [to] " - "[] [to] brightness" - "[] [to] " - - "[] [all] [the] lights [] to [brightness]" + - "[] [(|)] [] to [brightness]" response: "brightness" - sentences: @@ -78,13 +78,13 @@ intents: domain: light response: "color" - sentences: - - "[] [[the] color of] ( | [all [the]] lights in | [all] lights) [to] {color}" + - "[] [[the] color of] ( | [] lights in | [all] lights) [to] {color}" - "[] ( | [all] lights in | [all] lights) [color] [to] {color}" response: "color" - sentences: - - "[] [[the] color of] [all] [to] {color}" - - "[] [[the] color of] [all] (;[to] {color})" + - "[] [[the] color of] [(|)] [to] {color}" + - "[] [[the] color of] [(|)] (;[to] {color})" expansion_rules: in_here: "[in] here" response: "color" diff --git a/sentences/en/light_HassTurnOff.yaml b/sentences/en/light_HassTurnOff.yaml index 80b6f2b340..1f3245c8a0 100644 --- a/sentences/en/light_HassTurnOff.yaml +++ b/sentences/en/light_HassTurnOff.yaml @@ -16,20 +16,14 @@ intents: # Turn off all lights in an area - sentences: - " (off|out)" - - " (off|out) [in] " + - " (off|out) [] " - " (off|out) [] " - - " (off|out) [] " + - " (off|out) [(|)] " - "[] [] (off|out)" - - "[] [] (off|out)" - - "[] [] (off|out) " + - "[] [(|)] (off|out)" + - "[] [(|)] (off|out) " - "deactivate [] " - - "deactivate [] " - - " (off|out) [all] in " - - " (off|out) [all] " - - "[] [all] (off|out)" - - "[] [all] [in] (off|out)" - - " (off|out) in " - - " (off|out)" + - "deactivate [(|)] " slots: domain: "light" response: "lights_area" @@ -39,12 +33,12 @@ intents: - " (off|out)" - " (off|out) [] " - " (off|out) [] " - - " (off|out) [] [] " + - " (off|out) [(|)] [] " - "[] [] (off|out)" - - "[] [] [] (off|out)" - - "[] [] (off|out) [] " + - "[] [(|)] [] (off|out)" + - "[] [(|)] (off|out) [] " - "deactivate [] " - - "deactivate [] [] " + - "deactivate [(|)] [] " response: "lights_floor" slots: domain: "light" @@ -52,12 +46,12 @@ intents: # Turn off all lights in the home - sentences: - " (off|out) []" - - " (off|out) " + - " [] (off|out) " - " (off|out) []" - - " (off|out) " + - " (off|out) [] " - " (off|out) [] [the] " - "deactivate []" - - "deactivate " + - "deactivate [] " - "get every (off|out) []" - "make sure (off|out)" response: "light_all" @@ -67,17 +61,17 @@ intents: # Turn off lights in the same area as a satellite device - sentences: # Explicit optional all - - " [] (off|out) " - - " [] (off|out)" - - " (off|out) [] " - - "deactivate [] " - - "[] (off|out) " + - " [(|)] (off|out) " + - " [(|)] (off|out)" + - " (off|out) [(|)] " + - "deactivate [(|)] " + - "[] [] (off|out) " # Implicit no all - - " (off|out) []" - - " [] (off|out)" - - " (off|out) []" - - "deactivate []" + - " [] (off|out) []" + - " [] [] (off|out)" + - " (off|out) [] []" + - "deactivate [] []" - " (off|out) []" response: "lights_area" slots: diff --git a/sentences/en/light_HassTurnOn.yaml b/sentences/en/light_HassTurnOn.yaml index 5599772f41..a780da7d33 100644 --- a/sentences/en/light_HassTurnOn.yaml +++ b/sentences/en/light_HassTurnOn.yaml @@ -22,12 +22,12 @@ intents: - " on" - " on [in] " - " on [] " - - " on [] " + - " on [(|)] " - "[] [] on" - - "[] [] on" - - "[] [] on " + - "[] [(|)] on" + - "[] [(|)] on " - "activate [] " - - "activate [] " + - "activate [(|)] " slots: domain: "light" response: "lights_area" @@ -38,12 +38,12 @@ intents: - " on" - " on [] " - " on [] " - - " on [] [] " + - " on [(|)] [] " - "[] [] on" - - "[] [] [] on" - - "[] [] on [] " + - "[] [(|)] [] on" + - "[] [(|)] on [] " - "activate [] " - - "activate [] [] " + - "activate [(|)] [] " response: "lights_floor" slots: domain: "light" @@ -51,16 +51,15 @@ intents: # Turn on all lights in the home - sentences: - "(light up|activate|illuminate) " - - "(light up|illuminate) the (entire|whole) " - "(light up|illuminate) []" - " on []" - - " on " + - " [] on " - " on []" - - " on " - - " on [] [the] " + - " on [] " + - " on [(|)] " - "activate []" - - "activate " - - "get every on []" + - "activate [] " + - "get on []" - "illuminate areas []" - make sure on response: "light_all" @@ -70,17 +69,17 @@ intents: # Turn on lights in the same area as a satellite device - sentences: # Explicit optional all - - " [] on " - - " [] on" - - " on [] " - - "activate [] " - - "[] on " + - " [(|)] on " + - " [(|)] on" + - " on [(|)] " + - "activate [(|)] " + - "[(|)] on " # Implicit no all - - " on []" - - " [] on" - - " on []" - - "activate []" + - " [] on []" + - " [] [] on" + - " on [] []" + - "activate [] []" - " on []" - "light (it|) up" - "light up []" diff --git a/tests/en/light_HassTurnOff.yaml b/tests/en/light_HassTurnOff.yaml index 3fa0dbcfcc..42c6b7e7ab 100644 --- a/tests/en/light_HassTurnOff.yaml +++ b/tests/en/light_HassTurnOff.yaml @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/tests/en/light_HassTurnOn.yaml b/tests/en/light_HassTurnOn.yaml index 094b4f392b..8508dd3b30 100644 --- a/tests/en/light_HassTurnOn.yaml +++ b/tests/en/light_HassTurnOn.yaml @@ -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 @@ -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 @@ -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: @@ -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 @@ -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: @@ -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 @@ -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 @@ -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