From 90f4809c177eb82e234cc8ebf38d58b75eae7d49 Mon Sep 17 00:00:00 2001 From: Martijn van der Pol Date: Mon, 8 Jul 2024 07:35:45 +0000 Subject: [PATCH 1/5] [NL] Finetune cover_HassGetState --- sentences/nl/_common.yaml | 11 ++++------- sentences/nl/cover_HassGetState.yaml | 15 ++++++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/sentences/nl/_common.yaml b/sentences/nl/_common.yaml index 8125435539..05f2123a92 100644 --- a/sentences/nl/_common.yaml +++ b/sentences/nl/_common.yaml @@ -375,15 +375,12 @@ lists: expansion_rules: # generic expansion rules for sentences - name: "[de|het] {name}" - area: "[de|het] {area}" + name: "[de |het ]{name}" + area: "[de |het ]{area}" + floor: "[de |het ]{floor}" in: "[in|op|van|bij]" met: "(door|met|bij)" - name_area: > - ( - [[ de|het|een] {area}][ ] - |[de|het|een] {name}[ ][] [[in|op|van|bij] ] - ) + name_area: "([ ][ ];[ ][])" sensor_name_area: > ( [[door|met|bij] [de|het|een] {area}][ ]{name} diff --git a/sentences/nl/cover_HassGetState.yaml b/sentences/nl/cover_HassGetState.yaml index 59af295402..af44a9d3cb 100644 --- a/sentences/nl/cover_HassGetState.yaml +++ b/sentences/nl/cover_HassGetState.yaml @@ -3,7 +3,8 @@ intents: HassGetState: data: - sentences: - - " [er] {cover_states:state} [ ]" + - " [er] ([ ][ ];[[ ]]) {cover_states:state} [ (|)]" + - " [[ ]] {cover_states:state} [ (|)] " response: one_yesno requires_context: domain: cover @@ -11,25 +12,29 @@ intents: domain: cover - sentences: - - [er] [ |ergens|nog] [een] {cover_classes:device_class} [ ] {cover_states:state} [ ] + - " [er ][ (|) |ergens |nog ][een ]{cover_classes:device_class} [ ] {cover_states:state} [ ]" + - " [er ]{cover_classes:device_class} ({cover_states:state}; (|))" response: any slots: domain: cover - sentences: - - [ ] [] [de] {cover_classes:device_class} [ ] {cover_states:state} [ ] + - " [ (|) ][ |de ]{cover_classes:device_class} {cover_states:state}" + - " [ | de ]{cover_classes:device_class} ( (|);{cover_states:state})" response: all slots: domain: cover - sentences: - - Welk[e] {cover_classes:device_class} [ ] {cover_states:state} [ ] + - "Welk[e] {cover_classes:device_class} {cover_states:state}" + - "Welk[e] {cover_classes:device_class} ([ (|)]; {cover_states:state})" response: which slots: domain: cover - sentences: - - Hoe[ ]veel {cover_classes:device_class} [ ] [er] [ ] {cover_states:state} [ ] + - "Hoe[ ]veel {cover_classes:device_class} [ (|) ] [er ] {cover_states:state}" + - "Hoe[ ]veel {cover_classes:device_class} [er ]( (|);{cover_states:state})" response: how_many slots: domain: cover From 7d7bc65c40ff0306524cf34c8c8e305b338f60f2 Mon Sep 17 00:00:00 2001 From: Martijn van der Pol Date: Fri, 8 Nov 2024 10:41:36 +0100 Subject: [PATCH 2/5] [NL] Finetune cover_HassSetPosition (#2287) merge to other PR --- sentences/nl/cover_HassSetPosition.yaml | 15 ++++++++++++--- tests/nl/cover_HassSetPosition.yaml | 11 ++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sentences/nl/cover_HassSetPosition.yaml b/sentences/nl/cover_HassSetPosition.yaml index 6dc8970b8f..87f71744c2 100644 --- a/sentences/nl/cover_HassSetPosition.yaml +++ b/sentences/nl/cover_HassSetPosition.yaml @@ -3,14 +3,23 @@ intents: HassSetPosition: data: - sentences: - - "[|open|sluit] [positie ][] " + - "[ |open |sluit ][[ ]][[ ](positie|stand)] [ ]" + - "[ |open |sluit ][de ](positie|stand) [van ][[ ]] [ ]" + - "[ ][[ ]][[ ](positie|stand)] ([ ];(omhoog|omlaag))" + - "[ ][de ](positie|stand) [van ][[ ]] ([ ];(omhoog|omlaag))" requires_context: domain: cover slots: domain: cover - sentences: - - "(|open|sluit) [de |het ]{cover_classes:device_class}[ positie] ((op|naar) ; )" - - "(|open|sluit) [ ]{cover_classes:device_class}[ positie] (op|naar) " + - "(|open|sluit) [de |het ]{cover_classes:device_class}[[ ](positie|stand)] ( ; )" + - "(|open|sluit) [de ](positie|stand) [van ][de |het ]{cover_classes:device_class} ( ; )" + - "(|open|sluit) [ ]{cover_classes:device_class}[[ ](positie|stand)] " + - "(|open|sluit) [de ](positie|stand) [van ][ ]{cover_classes:device_class} " + - "[ ][de |het ][ ]{cover_classes:device_class}[[ ](positie|stand)] ([ ];(omhoog|omlaag))" + - "[ ][de ](positie|stand) [van ][de |het ][ ]{cover_classes:device_class} ([ ];(omhoog|omlaag))" + - "[ ]( ;[de |het ]{cover_classes:device_class}[[ ](positie|stand)]) ([ ];(omhoog|omlaag))" + - "[ ]( ;[de ](positie|stand) [van ][de |het ]{cover_classes:device_class}) ([ ];(omhoog|omlaag))" slots: domain: cover diff --git a/tests/nl/cover_HassSetPosition.yaml b/tests/nl/cover_HassSetPosition.yaml index e4f1ba957b..9e682264ac 100644 --- a/tests/nl/cover_HassSetPosition.yaml +++ b/tests/nl/cover_HassSetPosition.yaml @@ -3,6 +3,10 @@ tests: - sentences: - "zet gordijn links naar 50%" - "Gordijn Links 50 procent" + - "Positie van gordijn links naar 50" + - "Doe gordijn links omhoog naar 50%" + - "Zet gordijn links naar 50% omlaag" + - "verlaag de stand van gordijn links naar 50%" intent: name: HassSetPosition slots: @@ -12,8 +16,13 @@ tests: response: "Positie aangepast" - sentences: - - "zet de gordijnen in de slaapkamer op 50%" + - "zet de gordijnen positie in de slaapkamer op 50%" - "open de gordijnen naar 50% in de slaapkamer" + - "doe de gordijnen stand in de slaapkamer naar 50% omhoog" + - "doe positie van de gordijnen in de slaapkamer naar 50% omhoog" + - "doe in de slaapkamer de gordijnen omlaag naar 50%" + - "doe de slaapkamergordijnenpositie omlaag naar 50%" + - "doe de stand van de slaapkamergordijnen omlaag naar 50" intent: name: HassSetPosition slots: From ae8462e404e8f29a1324728509adb5d6feec78aa Mon Sep 17 00:00:00 2001 From: Martijn van der Pol Date: Fri, 8 Nov 2024 10:09:19 +0000 Subject: [PATCH 3/5] remove spaces in optional parts --- sentences/nl/_common.yaml | 8 ++++---- sentences/nl/cover_HassGetState.yaml | 16 +++++++++------- sentences/nl/cover_HassSetPosition.yaml | 22 +++++++++++----------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/sentences/nl/_common.yaml b/sentences/nl/_common.yaml index 05f2123a92..b156913031 100644 --- a/sentences/nl/_common.yaml +++ b/sentences/nl/_common.yaml @@ -375,12 +375,12 @@ lists: expansion_rules: # generic expansion rules for sentences - name: "[de |het ]{name}" - area: "[de |het ]{area}" - floor: "[de |het ]{floor}" + name: "[de|het] {name}" + area: "[de|het] {area}" + floor: "[de|het] {floor}" in: "[in|op|van|bij]" met: "(door|met|bij)" - name_area: "([ ][ ];[ ][])" + name_area: "([ ][] |[ [ ]][ ])" sensor_name_area: > ( [[door|met|bij] [de|het|een] {area}][ ]{name} diff --git a/sentences/nl/cover_HassGetState.yaml b/sentences/nl/cover_HassGetState.yaml index af44a9d3cb..067015d3b7 100644 --- a/sentences/nl/cover_HassGetState.yaml +++ b/sentences/nl/cover_HassGetState.yaml @@ -3,7 +3,8 @@ intents: HassGetState: data: - sentences: - - " [er] ([ ][ ];[[ ]]) {cover_states:state} [ (|)]" + - " [er] [[ ]] {cover_states:state} [ (|)]" + - " [er] ( (|)[ ];[[ ]]) {cover_states:state}" - " [[ ]] {cover_states:state} [ (|)] " response: one_yesno requires_context: @@ -12,15 +13,16 @@ intents: domain: cover - sentences: - - " [er ][ (|) |ergens |nog ][een ]{cover_classes:device_class} [ ] {cover_states:state} [ ]" - - " [er ]{cover_classes:device_class} ({cover_states:state}; (|))" + - " [er] [ ||ergens|nog] [een] {cover_classes:device_class} {cover_states:state}" + - " [er] [ergens|nog] [een] {cover_classes:device_class} ( ;{cover_states:state})" + - " [er] {cover_classes:device_class} ({cover_states:state}; (|))" response: any slots: domain: cover - sentences: - - " [ (|) ][ |de ]{cover_classes:device_class} {cover_states:state}" - - " [ | de ]{cover_classes:device_class} ( (|);{cover_states:state})" + - " [ (|)] [|de] {cover_classes:device_class} {cover_states:state}" + - " [|de] {cover_classes:device_class} ( (|);{cover_states:state})" response: all slots: domain: cover @@ -33,8 +35,8 @@ intents: domain: cover - sentences: - - "Hoe[ ]veel {cover_classes:device_class} [ (|) ] [er ] {cover_states:state}" - - "Hoe[ ]veel {cover_classes:device_class} [er ]( (|);{cover_states:state})" + - "Hoe[ ]veel {cover_classes:device_class} [ (|)] [er] {cover_states:state}" + - "Hoe[ ]veel {cover_classes:device_class} [er] ( (|);{cover_states:state})" response: how_many slots: domain: cover diff --git a/sentences/nl/cover_HassSetPosition.yaml b/sentences/nl/cover_HassSetPosition.yaml index 87f71744c2..0d37cea234 100644 --- a/sentences/nl/cover_HassSetPosition.yaml +++ b/sentences/nl/cover_HassSetPosition.yaml @@ -3,23 +3,23 @@ intents: HassSetPosition: data: - sentences: - - "[ |open |sluit ][[ ]][[ ](positie|stand)] [ ]" - - "[ |open |sluit ][de ](positie|stand) [van ][[ ]] [ ]" - - "[ ][[ ]][[ ](positie|stand)] ([ ];(omhoog|omlaag))" - - "[ ][de ](positie|stand) [van ][[ ]] ([ ];(omhoog|omlaag))" + - "[ |open |sluit] [[ ]][[ ](positie|stand)] [] " + - "[ |open |sluit] [de] (positie|stand) [van] [[ ]] [] " + - "[] [[ ]][[ ](positie|stand)] ([] ;(omhoog|omlaag))" + - "[] [de] (positie|stand) [van] [[ ]] ([] ;(omhoog|omlaag))" requires_context: domain: cover slots: domain: cover - sentences: - - "(|open|sluit) [de |het ]{cover_classes:device_class}[[ ](positie|stand)] ( ; )" - - "(|open|sluit) [de ](positie|stand) [van ][de |het ]{cover_classes:device_class} ( ; )" + - "(|open|sluit) [de |het] {cover_classes:device_class}[[ ](positie|stand)] ( ; )" + - "(|open|sluit) [de] (positie|stand) [van] [de |het] {cover_classes:device_class} ( ; )" - "(|open|sluit) [ ]{cover_classes:device_class}[[ ](positie|stand)] " - - "(|open|sluit) [de ](positie|stand) [van ][ ]{cover_classes:device_class} " - - "[ ][de |het ][ ]{cover_classes:device_class}[[ ](positie|stand)] ([ ];(omhoog|omlaag))" - - "[ ][de ](positie|stand) [van ][de |het ][ ]{cover_classes:device_class} ([ ];(omhoog|omlaag))" - - "[ ]( ;[de |het ]{cover_classes:device_class}[[ ](positie|stand)]) ([ ];(omhoog|omlaag))" - - "[ ]( ;[de ](positie|stand) [van ][de |het ]{cover_classes:device_class}) ([ ];(omhoog|omlaag))" + - "(|open|sluit) [de] (positie|stand) [van] [ ]{cover_classes:device_class} " + - "[] [de |het] [ ]{cover_classes:device_class}[[ ](positie|stand)] ([] ;(omhoog|omlaag))" + - "[] [de] (positie|stand) [van] [de |het] [ ]{cover_classes:device_class} ([] ;(omhoog|omlaag))" + - "[] ( ;[de |het] {cover_classes:device_class}[[ ](positie|stand)]) ([] ;(omhoog|omlaag))" + - "[] ( ;[de] (positie|stand) [van] [de |het] {cover_classes:device_class}) ([] ;(omhoog|omlaag))" slots: domain: cover From d8a9461dc9dc61435eb68ac1294815b7537ac944 Mon Sep 17 00:00:00 2001 From: Martijn van der Pol Date: Fri, 8 Nov 2024 10:42:02 +0000 Subject: [PATCH 4/5] small fix in name_area expansion rule --- sentences/nl/_common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentences/nl/_common.yaml b/sentences/nl/_common.yaml index b156913031..22162e7481 100644 --- a/sentences/nl/_common.yaml +++ b/sentences/nl/_common.yaml @@ -380,7 +380,7 @@ expansion_rules: floor: "[de|het] {floor}" in: "[in|op|van|bij]" met: "(door|met|bij)" - name_area: "([ ][] |[ [ ]][ ])" + name_area: "([[ ]] |[ [ ]][[ ]])" sensor_name_area: > ( [[door|met|bij] [de|het|een] {area}][ ]{name} From c08d4aca1aae0790a7db0a2582965db20990ac44 Mon Sep 17 00:00:00 2001 From: Martijn van der Pol Date: Sun, 10 Nov 2024 18:46:00 +0000 Subject: [PATCH 5/5] add hier expansion rule --- sentences/nl/_common.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/sentences/nl/_common.yaml b/sentences/nl/_common.yaml index 22162e7481..6a52aa0cc7 100644 --- a/sentences/nl/_common.yaml +++ b/sentences/nl/_common.yaml @@ -380,6 +380,7 @@ expansion_rules: floor: "[de|het] {floor}" in: "[in|op|van|bij]" met: "(door|met|bij)" + hier: "(hier|in deze (kamer|ruimte))" name_area: "([[ ]] |[ [ ]][[ ]])" sensor_name_area: > (