1
from common.music import (
2
OPINION_REQUESTS_ABOUT_MUSIC,
5
VARIOUS_GENRES_TEMPLATE,
9
from common.link import link_to_skill2i_like_to_talk
10
from common.universal_templates import NOT_LIKE_PATTERN, STOP_PATTERN
12
music_linkto = f"({'|'.join(OPINION_REQUESTS_ABOUT_MUSIC + link_to_skill2i_like_to_talk['dff_music_skill'])})"
21
[{"pattern": music_linkto}, "bot", True],
22
["is_no", "user", False],
23
[{"pattern": NOT_LIKE_PATTERN}, "user", False],
24
[{"pattern": STOP_PATTERN}, "user", False],
27
"can_continue": "must",
34
"wiki_parser_types": [
47
[{"pattern": MUSIC_REQUEST_RE}, "user", True],
49
"can_continue": "must",
52
"pattern": MUSIC_TEMPLATE,
53
"expected_entities": ["genre", "singer", "group", "song"],
54
"expected_subtopic_info": [
55
{"subtopic": "discuss_genre", "cond": [[{"pattern": GENRES_TEMPLATE}, "user", True]]},
57
"subtopic": "discuss_singer",
58
"cond": [[{"wiki_parser_types": ["Q488205", "Q36834", "Q177220", "Q753110"]}, "user", True]],
60
{"subtopic": "discuss_group", "cond": [[{"wiki_parser_types": ["Q105756498", "Q215380"]}, "user", True]]},
61
{"subtopic": "discuss_song", "cond": [[{"wiki_parser_types": ["Q207628"]}, "user", True]]},
62
{"subtopic": "my_music", "cond": [[{"pattern": ASK_ABOUT_MUSIC}, "user", True]]},
63
{"subtopic": "various_genres", "cond": [[{"pattern": VARIOUS_GENRES_TEMPLATE}, "user", True]]},
64
{"subtopic": "alexa_music", "cond": [[{"pattern": MUSIC_REQUEST_RE}, "user", True]]},
65
{"subtopic": "various_music_types", "cond": [[{"pattern": music_linkto}, "bot", True]]},
66
{"subtopic": "what_music", "cond": [[{"pattern": "(music|song)"}, "user", True]]},
67
{"subtopic": "all_kinds_music", "cond": [["any"]]},
72
"I'm always happy to have a conversation with such a wonderful person!",
73
"You have an amazing music taste!",
75
"subtopic": "all_kinds_music",
76
"expected_subtopic_info": [{"subtopic": "relaxing_music", "cond": [["is_no", "user", False]]}],
79
"utt": ["I'm a music lover too! What music is in your playlist?"],
80
"subtopic": "what_music",
81
"expected_entities": ["genre", "singer", "group", "song"],
82
"expected_subtopic_info": ["genres", "singer", "group", "song", "my_music", "various_genres"],
85
"utt": ["Brilliant! I like this genre too!", "What singers or bands are in your playlist?"],
86
"subtopic": "various_genres",
87
"expected_entities": ["singer", "group", "song"],
91
"Yes, I like {user_genre}!",
92
"My favourite {user_genre} performer is {[bot_data, user_genre, singer]}.",
93
"The song {[bot_data, user_genre, song]} is the best!",
94
"What {user_genre} singers or bands are in your playlist?",
96
"subtopic": "discuss_genre",
97
"expected_entities": ["singer", "group", "song"],
98
"expected_subtopic_info": ["singer", "group", "song", "my_music"],
102
"You have a good taste in music! I also listen to {user_singer}.",
103
"I'm fascinated with their songs {[user_singer, songs]}.",
105
"subtopic": "discuss_singer",
106
"expected_subtopic_info": ["pop", "rock", "rap", "my_music"],
110
"You have a good taste in music! I also listen to {user_group}.",
111
"I'm fascinated with their songs {[user_group, songs]}.",
113
"subtopic": "discuss_group",
114
"expected_subtopic_info": ["pop", "rock", "rap", "my_music"],
117
"utt": ["The song {user_song} is very cool!", "I like listening to {[user_song, performer] music}."],
118
"subtopic": "discuss_song",
119
"expected_subtopic_info": ["pop", "rock", "rap", "my_music"],
122
"utt": ["I would like to tell you about some latest pop songs, should I continue?"],
124
"expected_subtopic_info": [{"subtopic": "pop_more", "cond": [["is_yes", "user", True]]}],
127
"utt": ["I would like to tell you about some latest popular rock songs, should I continue?"],
129
"expected_subtopic_info": [{"subtopic": "rock_more", "cond": [["is_yes", "user", True]]}],
132
"utt": ["I would like to tell you about some latest popular rap tracks, should I continue?"],
134
"expected_subtopic_info": [{"subtopic": "rap_more", "cond": [["is_yes", "user", True]]}],
138
"Save your tears by The Weeknd and Ariana Grande is a cool track.",
139
"Do you like Ariana Grande?",
141
"subtopic": "pop_more",
144
"utt": ["BTS song Butter is number one in the chart.", "What do you think about Korean pop or K-pop?"],
145
"subtopic": "pop_more",
148
"utt": ["Noverber Rain by Gunz and Roses is a cool track! Do you like Gunz and Roses?"],
149
"subtopic": "rock_more",
153
"I also like Nothing Else Matters by Metallica.",
154
"Lars Ulrich told that they are recording a new album which will be the best in "
155
"their discography.",
157
"subtopic": "rock_more",
161
"I did it by DJ Khaled, Post Malone, DaBaby and Megan Thee Stallion is a cool track!",
162
"Do you like the vocal of Post Malone?",
164
"subtopic": "rap_more",
168
"I also like Austronaut in the Ocean track of Masked Wolf.",
169
"I saw a clip for this song Youtube, it is about spaceflight on the Moon.",
171
"subtopic": "rap_more",
173
{"utt": ["I like Scorpions.", "Wind of Change is the best!"], "subtopic": "my_music"},
176
"I think that live performance of your favourite singer is a cool event.",
177
"Have you been to any live shows lately?",
181
"utt": ["Do you like listening to music on the journey, in the car or in the bus?"],
184
"cond": [["is_yes", "user", True], [{"pattern": "(car|bus)"}, "user", True]],
185
"answer": "Great! Relaxing music makes time go faster.",
188
"cond": [["is_no", "user", True]],
189
"answer": "I agree with you! It's better to travel in silence.",
194
"utt": ["Do you listen to music in headphones or on a portable speaker?"],
197
"cond": [[{"pattern": "(head|phones)"}, "user", True]],
198
"answer": "Great! Headphones enhance the thrill of music.",
201
"cond": [[{"pattern": "speaker"}, "user", True]],
202
"answer": "Great! A speaker helps to share your favourite tracks " "with your friends.",
207
"utt": ["Do you play any musical instrument?"],
211
["is_yes", "user", True],
214
"pattern": "(piano|violin|guitar|drum|bass|trombome|trumpet"
215
"|flute|cello|banjo|harmo|accordeon|synth|ukulele)"
221
"answer": "You are a very creative person!",
223
{"cond": [["is_no", "user", True]], "answer": "Ok! It's never late to try!"},
228
"Do you like to listen to music during gaming, while you are playing a game?",
229
"I can tell you about some music for gaming, should I continue?",
231
"expected_subtopic_info": [
233
"subtopic": "gaming_music",
234
"cond": [["is_yes", "user", True], [{"pattern": "(continue|tell)"}, "user", True]],
240
"I like gaming music mixes on Youtube.",
241
"There are drum-n-bass, trap, electro house and dubstep in these tracklists.",
242
"Would you like to know about some chilling tracks you can listen while gaming?",
244
"expected_subtopic_info": [
246
"subtopic": "gaming_music_tracks",
247
"cond": [["is_yes", "user", True], [{"pattern": "(continue|tell)"}, "user", True]],
250
"subtopic": "gaming_music",
254
"Vicetone, Ship Wrek, Roy Knox and TheFatRat are top performers!",
255
"Have a pleasant listening!",
257
"subtopic": "gaming_music_tracks",
261
"I'm sorry, i do not have this function. But I am a music lover too!",
262
"I can tell you about some relaxing music, should I?",
264
"subtopic": "alexa_music",
265
"expected_subtopic_info": [{"subtopic": "relaxing_music", "cond": [["is_no", "user", False]]}],
269
"Cool! I am a music lover too!",
270
"I can tell you about some relaxing music, should I continue?",
272
"subtopic": "various_music_types",
273
"expected_subtopic_info": [{"subtopic": "relaxing_music", "cond": [["is_no", "user", False]]}],
277
"There are a lot of compilations of relaxing music on Youtube.",
278
"I like Peter Helland music, it is very chilling. Would you like to hear more?",
280
"subtopic": "relaxing_music",
281
"expected_subtopic_info": [{"subtopic": "more_relaxing_music", "cond": [["is_yes", "user", True]]}],
285
"You can listen to sound of nature, for example birdsong or the sounds of sea.",
286
"Do you like sounds of the rain?",
288
"subtopic": "more_relaxing_music",
290
{"cond": [["is_yes", "user", True]], "answer": "Me too! I like to dream listening sounds of rain."}
295
"rock": {"singer": "Deep Purple", "song": "Smoke on the Water"},
296
"pop": {"singer": "Drake", "song": "Hotline Bling"},
297
"rap": {"singer": "Travis Scott", "song": "Goosebumps"},
298
"jazz": {"singer": "Louis Armstrong", "song": "What a Wonderful World"},
299
"reggae": {"singer": "Bob Marley", "song": "Get Up Stand Up"},
300
"rnb": {"singer": "Beyonce", "song": "All Night"},
304
"cond": [[{"pattern": "my favo(u)?rite song is (.*?)"}, "user", True]],
305
"answer": ["I like this song too!"],
308
"cond": [[[{"pattern": "live shows"}, "bot", True], ["is_yes", "user", True]]],
309
"answer": ["I'm happy that you had a good time!"],
312
"cond": [[[{"pattern": "live shows"}, "bot", True], ["is_no", "user", True]]],
313
"answer": ["There wasn't much going on due to CoVID-19. Hope we will get some in future."],
316
"expected_entities_info": {
318
"name": "user_genre",
320
["pop", "(\\bpop|popular music)"],
321
["rock", "(\\brock|\\bpunk|heavy metal)"],
322
["rap", "(\\brap|hip hop)"],
323
["jazz", "(jazz|blues)"],
324
["reggae", "reggae"],
325
["rnb", "rnb|r\\.n\\.b\\.|are and b\\.|r. and b."],
329
"name": "user_singer",
330
"wiki_parser_types": ["Q488205", "Q36834", "Q177220", "Q753110"],
331
"relations": ["genre", "songs", "albums", "part of"],
334
"name": "user_group",
335
"wiki_parser_types": ["Q105756498", "Q215380"],
336
"relations": ["genre", "songs", "albums", "has part"],
340
"wiki_parser_types": ["Q207628"],
341
"relations": ["genre", "performer", "part of"],
344
"expected_subtopics": {
345
"genres": {"subtopic": "discuss_genre", "cond": [[{"pattern": GENRES_TEMPLATE}, "user", True]]},
347
"subtopic": "discuss_singer",
348
"cond": [[{"wiki_parser_types": ["Q488205", "Q36834", "Q177220", "Q753110"]}, "user", True]],
351
"subtopic": "discuss_group",
352
"cond": [[{"wiki_parser_types": ["Q105756498", "Q215380"]}, "user", True]],
354
"song": {"subtopic": "discuss_song", "cond": [[{"wiki_parser_types": ["Q207628"]}, "user", True]]},
358
[{"user_info": {"user_genre": "pop"}}, "user", True],
359
[{"entity_triplets": ["user_singer", "genre", ["pop", "pop music"]]}],
365
[{"user_info": {"user_genre": "rock"}}, "user", True],
367
{"entity_triplets": ["user_singer", "genre", ["rock", "rock music", "heavy metal"]]},
376
[{"user_info": {"user_genre": "rap"}}, "user", True],
377
[{"entity_triplets": ["user_singer", "genre", ["rap", "hip hop"]]}, "user", True],
381
"subtopic": "my_music",
382
"cond": [[{"pattern": "(what|which) (music )?(do )?you " "(like|enjoy)"}, "user", True]],
385
"subtopic": "various_genres",
386
"cond": [[{"pattern": VARIOUS_GENRES_TEMPLATE}, "user", True]],