From dbffde3c25e65cee4f5bd00e8fa676d76332c16d Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Wed, 6 Nov 2024 16:52:51 +0000 Subject: [PATCH 1/5] Improve sentence structure --- sentences/en/_common.yaml | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index 957c9ddec4..7539e7bf21 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -124,7 +124,7 @@ lists: out: window lock_states: values: - - in: "[securely ]locked" + - in: "[securely] locked" out: "locked" - in: "unlocked" out: "unlocked" @@ -244,7 +244,7 @@ lists: bs_power_states: values: - - in: "(powered[ on]|power detected)" + - in: "(powered [on]|power detected)" out: "on" - in: "(not powered|powered off)" out: "off" @@ -361,40 +361,40 @@ lists: wildcard: true expansion_rules: - name: "[the ]{name}" - area: "[the ]{area}" - floor: "[the ]{floor}[ floor]" + name: "[the] {name}" + area: "[the] {area}" + floor: "[the] {floor} [floor]" area_floor: "(|)" - in_area_floor: "[ ]" - what_is: "(what's|whats|what is|tell me)[ the]" - lockable: "[(the|my) ](lock|door|window|gate|garage door|shutter)[s]" + in_area_floor: "[] " + what_is: "(what's|whats|what is|tell me) [the]" + lockable: "[(the|my)] (lock|door|window|gate|garage door|shutter)[s]" where_is: "(where's|wheres|where is)" - which: "(which|what)[ of the]" - is: "(is|are)[ (there|the)]" + which: "(which|what) [of the]" + is: "(is|are) [(there|the)]" are: "" - any: "(any|some)[ of the]" - are_any: "[ ]" - how_many: "how many[ of the]" - brightness: "{brightness}[[ ]%| percent]" - light: "[the ](light|lights|lighting|lamp|lamps)" + any: "(any|some) [of the]" + are_any: "[] " + how_many: "how many [of the]" + brightness: "{brightness} [%|percent]" + light: "[the] (light|lights|lighting|lamp|lamps)" turn: "(turn|switch|change)" temp: "(temp|temperature)" - temperature: "{temperature}[([ ]°[ ][{temperature_unit}])|( degrees[ {temperature_unit}])]" - open: "(open|raise|lift)[ up]" - close: "(close|shut|lower)[ (up|down)]" + temperature: "{temperature} [(° [{temperature_unit}])|(degrees [{temperature_unit}])]" + open: "(open|raise|lift) [up]" + close: "(close|shut|lower) [(up|down)]" set: "(set|make|change|turn)" - numeric_value_set: "(set|change|turn[ (up|down)]|increase|decrease|make)" + numeric_value_set: "(set|change|turn [(up|down)]|increase|decrease|make)" in: "(in|on|at|of)" - position: "{position}[[ ]%| percent]" - volume: "{volume:volume_level}[[ ]%| percent]" + position: "{position} [%|percent]" + volume: "{volume:volume_level} [%|percent]" currently: "(currently|presently|right now|at the moment)" - state: "[(present|current) ](state|status)" + state: "[(present|current)] (state|status)" # Context awareness expansion rules - all: "(all[[ of] the]|every[ single]|each[ and every])" - are_all: "[ ]" + all: "(all [[of] the]|every [single]|each [and every])" + are_all: "[] " home: "(home|house|appartment|flat)" - everywhere: "(everywhere|in (all|each)[[ of] the] room[s]|in every room[s]|in the )" + everywhere: "(everywhere|in (all|each) [[of] the] room[s]|in every room[s]|in the )" here: "(here|in here|in this room|in the room)" # Questions @@ -404,13 +404,13 @@ expansion_rules: timer_set: "(start|set|create)" timer_cancel: "(cancel|stop)" timer_duration_seconds: "{timer_seconds:seconds} second[s]" - timer_duration_minutes: "({timer_minutes:minutes} minute[s][ [and ]{timer_seconds:seconds} second[s]])|({timer_minutes:minutes} and[ a] {timer_half:seconds} minute[s])|({timer_half:seconds} a minute[s])" - timer_duration_hours: "({timer_hours:hours} hour[s][ [and ]{timer_minutes:minutes} minute[s]][ [and ]{timer_seconds:seconds} second[s]])|({timer_hours:hours} and[ a] {timer_half:minutes} hour[s])|({timer_half:minutes} an hour[s])" + timer_duration_minutes: "({timer_minutes:minutes} minute[s] [[and] {timer_seconds:seconds} second[s]])|({timer_minutes:minutes} and [a] {timer_half:seconds} minute[s])|({timer_half:seconds} a minute[s])" + timer_duration_hours: "({timer_hours:hours} hour[s] [[and]{timer_minutes:minutes} minute[s]] [[and] {timer_seconds:seconds} second[s]])|({timer_hours:hours} and [a] {timer_half:minutes} hour[s])|({timer_half:minutes} an hour[s])" timer_duration: "||" timer_start_seconds: "{timer_seconds:start_seconds} second[s]" - timer_start_minutes: "{timer_minutes:start_minutes} minute[s][ [and ]{timer_seconds:start_seconds} second[s]]" - timer_start_hours: "{timer_hours:start_hours} hour[s][ [and ]{timer_minutes:start_minutes} minute[s]][ [and ]{timer_seconds:start_seconds} second[s]]" + timer_start_minutes: "{timer_minutes:start_minutes} minute[s] [[and] {timer_seconds:start_seconds} second[s]]" + timer_start_hours: "{timer_hours:start_hours} hour[s] [[and] {timer_minutes:start_minutes} minute[s]] [[and] {timer_seconds:start_seconds} second[s]]" timer_start: "||" skip_words: From e3addbfdd88c17a7b87faba3527a5dcd9fb21270 Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Thu, 7 Nov 2024 09:54:52 +0000 Subject: [PATCH 2/5] Update sentences/en/_common.yaml Co-authored-by: Tudor Sandu --- sentences/en/_common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index 7539e7bf21..aad6ef67a1 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -379,7 +379,7 @@ expansion_rules: light: "[the] (light|lights|lighting|lamp|lamps)" turn: "(turn|switch|change)" temp: "(temp|temperature)" - temperature: "{temperature} [(° [{temperature_unit}])|(degrees [{temperature_unit}])]" + temperature: "{temperature}[[ ](°|degrees)[[ ]{temperature_unit}]]" open: "(open|raise|lift) [up]" close: "(close|shut|lower) [(up|down)]" set: "(set|make|change|turn)" From ebbc8fe440d43c32561cefeedf0ddbadd07558e2 Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Thu, 7 Nov 2024 09:54:58 +0000 Subject: [PATCH 3/5] Update sentences/en/_common.yaml Co-authored-by: Tudor Sandu --- sentences/en/_common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index aad6ef67a1..329e3eb135 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -385,7 +385,7 @@ expansion_rules: set: "(set|make|change|turn)" numeric_value_set: "(set|change|turn [(up|down)]|increase|decrease|make)" in: "(in|on|at|of)" - position: "{position} [%|percent]" + position: "{position}[ ][%|percent]" volume: "{volume:volume_level} [%|percent]" currently: "(currently|presently|right now|at the moment)" state: "[(present|current)] (state|status)" From 94ab419e2df6783eae2eb80a166814bd3a111ab2 Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Thu, 7 Nov 2024 09:55:26 +0000 Subject: [PATCH 4/5] Update sentences/en/_common.yaml Co-authored-by: Tudor Sandu --- sentences/en/_common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index 329e3eb135..3d4cac12ee 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -386,7 +386,7 @@ expansion_rules: numeric_value_set: "(set|change|turn [(up|down)]|increase|decrease|make)" in: "(in|on|at|of)" position: "{position}[ ][%|percent]" - volume: "{volume:volume_level} [%|percent]" + volume: "{volume:volume_level}[ ][%|percent]" currently: "(currently|presently|right now|at the moment)" state: "[(present|current)] (state|status)" From 39d6ec28af01a856f853f9170bb8c28bb05f90ff Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Thu, 7 Nov 2024 09:55:33 +0000 Subject: [PATCH 5/5] Update sentences/en/_common.yaml Co-authored-by: Tudor Sandu --- sentences/en/_common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentences/en/_common.yaml b/sentences/en/_common.yaml index 3d4cac12ee..a2e5e41227 100644 --- a/sentences/en/_common.yaml +++ b/sentences/en/_common.yaml @@ -375,7 +375,7 @@ expansion_rules: any: "(any|some) [of the]" are_any: "[] " how_many: "how many [of the]" - brightness: "{brightness} [%|percent]" + brightness: "{brightness}[ ][%|percent]" light: "[the] (light|lights|lighting|lamp|lamps)" turn: "(turn|switch|change)" temp: "(temp|temperature)"