Skip to content

Commit

Permalink
Finished light sentences and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cvladan committed Dec 28, 2022
1 parent c79d148 commit be25b94
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 35 deletions.
25 changes: 13 additions & 12 deletions sentences/sr/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ responses:
lists:
color:
values:
- in: "бел(а|o|у)"
- in: "бел(а|о|у)"
out: "white"
- in: "црн(а|o|у)"
- in: "црн(а|о|у)"
out: "black"
- in: "црвен(а|o|у)"
- in: "црвен(а|о|у)"
out: "red"
- in: "наранџаст(а|o|у)"
- in: "наранџаст(а|о|у)"
out: "orange"
- in: "жут(а|o|у)"
- in: "жут(а|о|у)"
out: "yellow"
- in: "зелен(а|o|у)"
- in: "зелен(а|о|у)"
out: "green"
- in: "плав(а|o|у)"
- in: "плав(а|о|у)"
out: "blue"
- in: "љубичаст(а|o|у) | лила"
- in: "љубичаст(а|о|у) | лила"
out: "purple"
- in: "браон | смеђ(а|е|у)"
out: "brown"
- in: "ружичаст(а|o|у) | розе"
- in: "ружичаст(а|о|у) | розе"
out: "pink"
brightness:
range:
Expand All @@ -47,12 +47,13 @@ lists:
- in: "Ф | [степен[а|и]] (Фаренхајт[а] | у Фаренхајтима)"
out: "fahrenheit"
expansion_rules:
area: "[у просторији] {area}"
brightness: "{brightness:brightness_pct} [посто]"
name: "{name}"
area: "[у [просторији]|на] {area}"
brightness: "{brightness:brightness_pct} [посто|процената]"
temperature: "{temperature}"
упали: "(упали[ш|те|мо] | укључи[ш|те|мо])"
угаси: "(угаси[ш|те|мо] | искључи[ш|те|мо])"
подеси: "(подеси | намести | постави | сетуј | промени)"
подеси: "(подеси[ш] | намести[ш] | постави[ш] | сетуј[еш] | промени[ш])"
skip_words:
- "молим [те|вас] [да]"
- "може(ш|те) [ли] [да]"
Expand Down
7 changes: 4 additions & 3 deletions sentences/sr/light_HassLightSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ intents:
data:
# brightness
- sentences:
- "<подеси> <name> на <brightness>"
- "<подеси> [осветљење | јачину [светла] | светло] <name> на <brightness> [снаге | јачине | светлине]"
- "<подеси> [[јачину | интензитет] светл(а|о) у] <area> [на] <brightness> [снаге | јачине | светлине]"
- "<подеси> [[јачину | интензитет] светл(а|о) у | осветљење у] <area> [на] <brightness> [снаге | јачине | светлине]"
slots:
name: "all"
domain: "light"
# color
- sentences:
- "<подеси> боју <name> на {color}"
- "<подеси> <name> [на] {color} [боју]"
- "<подеси> [боју] светл(а|о) [у [просторији]] <area> на {color}"
slots:
name: "all"
domain: "light"
38 changes: 30 additions & 8 deletions tests/sr/_fixtures.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
language: sr
areas:
- name: Kitchen
- name: "купатил(о|у)"
id: bathroom
- name: "спаваћ(а|ој) соб(а|и)"
id: bedroom
- name: "офис | канцеларија"
id: office
- name: "радн(а|ој) соб(а|и)"
id: study
- name: "терас(а|и) | балкон(у) | лођ(а|и)"
id: balcony
- name: "ормар(у) | плакар(у)"
id: closet
- name: "улаз(у) | предсобљ(е|у) | прецобљ(е|у)"
id: entrance
- name: "ходник(у) | пролаз(у)"
id: hallway
- name: "шпаиз(у) | шпјз(у) | остав(а|и)"
id: pantry
- name: "гардероб(и|а|ер|еру)"
id: wardrobe
- name: "веце(у) | вц(у)"
id: wc
- name: "степенице | степеништ(е|у)"
id: staircase
- name: "Кухињ(а|и)"
id: kitchen
- name: Living Room
- name: "дневн(а|ој) соб(а|и)"
id: living_room
- name: Bedroom
id: bedroom
- name: Garage
- name: "гараж(а|и)"
id: garage
entities:
- name: Bedroom Lamp
- name: "ноћн(а|у|е) ламп(а|у|е)"
id: light.bedroom_lamp
area: bedroom
- name: Kitchen Switch
- name: "кухињски прекидач"
id: switch.kitchen
area: kitchen
- name: Ceiling Fan
- name: "(плафонски) вентилатор (на плафону)"
id: fan.ceiling
area: living_room
41 changes: 37 additions & 4 deletions tests/sr/light_HassLightSet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
language: sr
tests:
- sentences: []
intent:
name: HassLightSet
slots: {}
# brightness
- sentences:
- "сетуј ноћну лампу на 50%"
- "подеси ноћну лампу на 50 посто"
- "подеси ноћну лампу на 50% светлине"
- "намести ноћну лампу на 50% снаге"
- "постави осветљење ноћне лампе на 50 процената"
intent:
name: HassLightSet
slots:
brightness_pct: 50
name: light.bedroom_lamp
- sentences:
- "постави осветљење у спаваћој соби на 50%"
- "подеси осветљење у спаваћој соби на 50%"
- "сетуј светло у спаваћој соби на 50%"
intent:
name: HassLightSet
slots:
brightness_pct: 50
area: bedroom
# color
- sentences:
- "подеси ноћну лампу на плаву боју"
- "постави боју ноћне лампе на плаву"
intent:
name: HassLightSet
slots:
color: blue
name: light.bedroom_lamp
- sentences:
- "сетуј боју светла у дневној соби на зелено"
intent:
name: HassLightSet
slots:
color: green
area: living_room
12 changes: 8 additions & 4 deletions tests/sr/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
language: sr
tests:
- sentences: []
intent:
name: HassTurnOff
slots: {}
- sentences:
- "угаси сва светла у кухињи"
- "угаси светло у кухињи"
intent:
name: "HassTurnOff"
slots:
area: "kitchen"
domain: "light"
11 changes: 7 additions & 4 deletions tests/sr/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
language: sr
tests:
- sentences: []
intent:
name: HassTurnOn
slots: {}
- sentences:
- "Упали светло у дневној соби"
- "Упали сва светла у кухињи"
- "Укључи светло у ходнику"
intent:
name: HassTurnOn
slots: {}

0 comments on commit be25b94

Please sign in to comment.