Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
188b756
Update opening_minutes.dialog
NeonClary Nov 3, 2022
75410ad
Update shop_by_floor.dialog
NeonClary Nov 3, 2022
d209e79
Update shop_not_found.dialog
NeonClary Nov 3, 2022
fa25296
Update start_parsing.dialog
NeonClary Nov 3, 2022
3b8e3e3
Update stop.dialog
NeonClary Nov 3, 2022
0c1bf36
Update which_floor.dialog
NeonClary Nov 3, 2022
e4884b9
Update no_shop_request.dialog
NeonClary Nov 3, 2022
4a622a5
Update no_shop_on_level.dialog
NeonClary Nov 3, 2022
b32670c
Update more_than_one.dialog
NeonClary Nov 3, 2022
a0379d7
Update finished.dialog
NeonClary Nov 3, 2022
dd59f52
Update closing_minutes.dialog
NeonClary Nov 3, 2022
3a2e349
Update closed_now.dialog
NeonClary Nov 3, 2022
2a622d6
Update choose_selection.dialog
NeonClary Nov 3, 2022
1cd8c7c
Update ask_more.dialog
NeonClary Nov 3, 2022
94b6a31
time processing in lingua-franca, shop->store replacement
NeonMariia Nov 14, 2022
46a7a24
time processing changes
NeonMariia Nov 14, 2022
3bd5a45
required fixes, gui mock setup
NeonMariia Nov 16, 2022
92fda95
changes in intent file
NeonMariia Nov 16, 2022
ff9ab39
time bug fixes
NeonMariia Nov 18, 2022
500cf74
time bug fixes
NeonMariia Nov 21, 2022
f17c3e9
time fixes
NeonMariia Nov 22, 2022
8511b68
tests fixes
NeonMariia Nov 22, 2022
4c16ab0
Update another_store.dialog
NeonClary Nov 29, 2022
22ebd9a
Update another_store.dialog
NeonClary Nov 30, 2022
fc530da
Update open_now.dialog
NeonClary Nov 30, 2022
18c6abd
Update time_before_closing.dialog
NeonClary Nov 30, 2022
2bb18eb
Update run_mall_parser.intent
NeonClary Nov 30, 2022
4e0e975
Update waiting_for_opening.dialog
NeonClary Nov 30, 2022
d2c481f
Update waiting_for_opening.dialog
NeonClary Nov 30, 2022
a06c284
open store search fixes
NeonMariia Nov 30, 2022
0897a33
open store search fixes
NeonMariia Nov 30, 2022
b3086db
Update more_than_one.dialog
NeonClary Dec 1, 2022
9058a3c
GUI fixes
NeonDaniel Dec 1, 2022
b6c6cd4
Update skill.json
NeonDaniel Dec 1, 2022
5824fc3
refactoring time from 12h to 24h format
NeonMariia Dec 11, 2022
5f5916b
files refactoring
NeonMariia Dec 11, 2022
acd988c
requirements fixes
NeonMariia Dec 11, 2022
8f3165a
Kiosk skill integration
NeonMariia Dec 13, 2022
695b5f8
kiosk methods adaptation
NeonMariia Dec 14, 2022
67b8408
store name extraction using regex
NeonMariia Dec 15, 2022
8c2971e
end interaction changes
NeonMariia Dec 27, 2022
5568f8b
message parsing changes
NeonMariia Dec 28, 2022
14462b7
comments removal
NeonMariia Dec 28, 2022
a093ff9
small changes
NeonMariia Dec 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
499 changes: 285 additions & 214 deletions __init__.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion locale/en-us/dialog/en/another_shop.dialog

This file was deleted.

2 changes: 2 additions & 0 deletions locale/en-us/dialog/en/another_store.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
What store are you looking for?

2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/ask_more.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Do you want to get another shop info?
Do you want to get info for another store?
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/choose_selection.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Do you want to select store by work hours or location?
Do you want to select a result by open hours or location?
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/closed_now.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{shop_name}} is closed now. Opens at {{open_time}}.
{{store_name}} is closed now. It opens at {{open_time}}.
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/closing_minutes.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{shop_name}} is open now. Closes in {{wait_min}} minutes.
{{store_name}} is open now. It closes in {{wait_min}} minutes.
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/finished.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Finished. Goodbye!
Have a good day!
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/goodbye.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ok. See you later!
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/greeting.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello!
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/how_can_i_help_you.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
How can I help you?
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/more_than_one.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I found more than one shop in your request.
I found more than one store location.
1 change: 0 additions & 1 deletion locale/en-us/dialog/en/no_shop_on_level.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/dialog/en/no_shop_request.dialog

This file was deleted.

1 change: 1 addition & 0 deletions locale/en-us/dialog/en/no_store_on_level.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I did not find that store on your level. Here are all possible locations.
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/no_store_request.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Okay!
3 changes: 2 additions & 1 deletion locale/en-us/dialog/en/open_now.dialog
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{{shop_name}} is open.
{{store_name}} is open.

1 change: 0 additions & 1 deletion locale/en-us/dialog/en/opening_hours.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/dialog/en/opening_minutes.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/dialog/en/shop_by_floor.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions locale/en-us/dialog/en/shop_not_found.dialog

This file was deleted.

5 changes: 5 additions & 0 deletions locale/en-us/dialog/en/start_mall_directory.intent
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
start mall directory skill
start mall skill
start mall parsing
start kiosk skill
kiosk skill
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/start_parsing.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I am parsing shops and malls for your request.
Let me look that up for you.
2 changes: 1 addition & 1 deletion locale/en-us/dialog/en/stop.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Do you want to exit the mall directory?
Are you finished getting store information for now?
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/store_by_floor.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do you want to get store info by floor?
3 changes: 3 additions & 0 deletions locale/en-us/dialog/en/store_not_found.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Sorry, I can't find {{store_name}}, but maybe I misunderstood, could you ask again please?
{{store_name}} isn't here, could you please repeat your query in case I misunderstood?
I apologize, I can't find a listing for {{store_name}} here. Can you please say that again?
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/time_before_closing.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{store_name}} is open now. Closes in {{duration}}.'
1 change: 1 addition & 0 deletions locale/en-us/dialog/en/timeout.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sorry, but waiting time is over.
2 changes: 2 additions & 0 deletions locale/en-us/dialog/en/waiting_for_opening.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{store_name}} is closed now. Opens in {{duration}}.'

3 changes: 1 addition & 2 deletions locale/en-us/dialog/en/which_floor.dialog
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Which floor are you staying on?
Which floor are you on?
On which floor are you?
what is your floor?
16 changes: 8 additions & 8 deletions locale/en-us/run_mall_parser.intent
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
where (is|are|can i find) {shop}
where (is|are) {shop} located
i am looking for {shop}
location of {shop}
where {shop}
show {shop}
show me {shop}
find {shop}
where (is|are|can i find) {store}
where (is|are) {store} located
i am looking for {store}
location of {store}
where {store}
show {store}
show me {store}
find {store}
56 changes: 56 additions & 0 deletions location_processing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#location operations
from lingua_franca.format import pronounce_number
import re


def location_format(location):
"""
Finds all digits in store's location and
formats them to numeral words.
Args:
location (str): location info
from stores info
Returns:
if digits were found:
pronounced (str): utterance with
pronounced digits
else:
location (str): not changed utterance
Examples:
'level 1' -> 'level one'
"""
floor = re.findall(r'\d+', location)
if len(floor) > 0:
floor = floor[0]
num = pronounce_number(int(floor), ordinals=False)
pronounced = re.sub(r'\d+', num, location)
return pronounced
else:
return location

def store_selection_by_floors(user_request, found_stores):
"""
If there are several stores in found stores list
and user agrees to select store by floor.
Finds all digits in store's location and
formats them to ordinal and cardinal numerals.
Matches formated numerals with user's request.
If store was found appends it to the new found
list.
Args:
user_request (str): floor from user
found_stores (list): found stores on user's
request
Returns:
stores_by_floor (list): stores that was found by floor
"""
stores_by_floor = []
for store in found_stores:
numbers = re.findall(r'\d+', store['location'])
if len(numbers) > 0:
numbers = numbers[0]
num = pronounce_number(int(numbers), ordinals=False)
num_ordinal = pronounce_number(int(numbers), ordinals=True)
if num in user_request or num_ordinal in user_request:
stores_by_floor.append(store)
return stores_by_floor
1 change: 1 addition & 0 deletions regex/store.rx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(where|find|show|i)?\s(is|are|need|can\s*i?\s?find*|me)?\s?(find)?\s?(\w+\s?\w*\s*)(situated)?
Loading