Files
Lumi/tests/dialogues_prag_en.py
T

564 lines
40 KiB
Python
Raw Normal View History

"""Multi-turn conversations that test how Lumi reads each utterance in its context, same format as
tests/dialogues.py (see its docstring).
English-led, some with a Korean or mixed turn inside. Each dialogue checks one pragmatic point: fragments and
"it" resolved from the turn before, a question turned back ("and you?"), topic shifts, corrections, back-channels,
confirmation questions, jokes and teasing, indirect requests against ability questions, words said to someone
else nearby, thanks against goodbye, repeated questions and answers to Lumi's own questions.
Facts in "must" come only from the SYSTEM prompt in assistant/brain.py and knowledge/lumi_about_en.md.
"""
from tests.dialogues import (T, D, NAME, MAKER, AGE, NS, INTRO, HEIGHT, WEIGHT, REACH, ONE_KG, TWO_KG, SPEED,
HOURS, LIDAR, WHISPER, GEMMA, LANGS, OBJ, NO, YES, KO)
WELCOME = r"welcome|no problem|anytime|my pleasure|glad|sure|of course|천만|별말|기뻐|좋아|감사"
ARM_KG = r"9\.9"
BASE_KG = r"\b50\b|오십"
TIME = r"\b({h12}|{h24})\b"
SONGS = r"Arirang|아리랑|Happy Birthday|Twinkle|Row,? Row|Fantastic Baby|Love Attack|BAD|곰 ?세 ?마리|Three Bears"
NOT_HEARD = r"didn't catch|did not catch|say (it|that) again|could you repeat|다시 (한 번 )?말씀"
DIALOGUES_PRAG_EN = [
# ---------- ellipsis: fragments after Lumi's answer ----------
D("engineer", "ellipsis", "en",
T("How fast can you drive?", must=[SPEED]),
T("And with a cup in your hand?", must=[r"10 ?(cm|centimet|센티)|ten centimet|slow"], no=[r"\b1\.2\b"],
check="fragment: driving speed while holding a cup, about 10 cm/s"),
T("Uphill?", must=[r"\b8\b|eight"], check="fragment: the slope it can climb, at most 8 degrees"),
T("Stairs?", must=[NO], check="fragment: no stairs"),
T("Okay, that's everything, thanks.", "end")),
D("parent", "ellipsis", "en",
T("How tall are you, Lumi?", must=[HEIGHT]),
T("And when you stretch up?", must=[r"186|40"], check="fragment: height with the lift raised, up to 186 cm"),
T("Taller than my husband then.", must=[r"\w"],
check="a playful remark: a light reply, no invented height for the husband"),
T("Ha. Okay, bye now.", "end")),
D("student", "ellipsis", "en",
T("How much does your arm weigh?", must=[ARM_KG]),
T("And the base?", must=[BASE_KG], no=[ARM_KG], check="fragment: the base's own weight, 50 kg"),
T("All together?", must=[WEIGHT], check="fragment: whole robot, about 96 kg"),
T("Heavier than a person, huh.", must=[r"\w"], check="a remark: agrees briefly, no new numbers needed")),
D("business visitor", "ellipsis", "en",
T("How long does your battery last?", must=[HOURS]),
T("And charging?", must=[NS], no=[r"\b\d+ ?(minutes?|분)\b"],
check="fragment: how long charging takes, which Lumi does not know"),
T("Roughly?", must=[NS], no=[r"\b([1-9]|1[1-9]) ?(hours?|시간)\b", r"\b\d+ ?(minutes?|분)\b"],
check="still the charging time: not known, no invented estimate"),
T("Fair enough.", must=[r"\w"], check="acknowledgement, the talk goes on")),
D("kid 9", "ellipsis", "en",
T("How far can your arm reach?", must=[REACH]),
T("And how much can it hold?", must=[ONE_KG + "|" + TWO_KG], check="'it' = the arm: about 1 kg in the hand (2 kg with the gripper)"),
T("Even a watermelon?", must=[NO], check="fragment: lifting a watermelon, too heavy"),
T("What about an apple?", must=[r"apple|사과|yes|can"], no=[r"\bwatermelon\b.*\bcan\b"],
check="fragment: an apple is light and on its list of things to pick (may say not tried yet)")),
D("AI engineer", "ellipsis", "en",
T("What do you use for speech recognition?", must=[WHISPER]),
T("And for the answers?", must=[GEMMA], check="fragment: the language model, Gemma 4"),
T("Who makes that one?", must=[r"Google|구글"], no=[r"OpenAI"], check="'that one' = Gemma: Google"),
T("Running locally?", must=[r"yes|own|local|Thor|on (the|my) robot|without the (internet|cloud)|no cloud"],
check="fragment: yes, on its own Jetson Thor, no cloud")),
D("elderly visitor", "ellipsis", "en",
T("Can you climb stairs?", must=[NO]),
T("How about a small step?", must=[r"1\.5"], check="fragment: a step of at most 1.5 cm"),
T("And a ramp?", must=[r"\b8\b|eight"], check="fragment: a slope of at most 8 degrees"),
T("Thank you, that's all I wanted to know.", "end")),
D("foreign student", "ellipsis", "en",
T("What languages do you speak?", must=[LANGS]),
T("Japanese?", must=[NO], act="none", no=[r"only understand English and Korean\.?$"],
check="fragment: asks if it speaks Japanese: no, only English and Korean; a clear question, not unclear"),
T("Not even a little?", must=[NO], check="still Japanese: no"),
T("Okay, English it is.", must=[r"\w"], check="a light reply; continues in English")),
# ---------- anaphora: it / that one / they ----------
D("engineer", "anaphora", "en",
T("What camera is in your head?", must=[r"Orbbec|Gemini"]),
T("How far can it see?", must=[r"10 ?(m\b|met|미터)|ten met"], check="'it' = the head camera: about 10 m"),
T("And the one at the front of your base?", must=[r"35|2 ?(m\b|met)|two met"],
check="'the one' = the base's 3D camera: 35 cm to 2 m"),
T("Which one finds the cups?", must=[r"body|torso|chest|몸"], no=[r"\bbase camera\b"],
check="the body camera finds objects for the arm")),
D("student", "anaphora", "en",
T("What gripper do you have?", must=[r"Zimmer"]),
T("How fast does it close?", must=[r"one second|1 ?(s\b|sec)|1 ?초|일 ?초|a second"], check="'it' = the gripper: about one second"),
T("Can it hold a paper cup?", must=[NO], check="no: a paper cup is too soft, squeezed flat"),
T("Why not?", must=[r"soft|squeez|flat|crush|부드|찌그"], check="'why not' about the paper cup: too soft")),
D("investor", "anaphora", "en",
T("Who made you?", must=[MAKER]),
T("Where are they based?", must=[r"Seoul|서울"], check="'they' = Cutshion: Seoul"),
T("When did they start?", must=[r"2022"], check="'they' = Cutshion: founded July 2022"),
T("And what else do they make?", must=[r"barista|drawing|cooking|ice cream|welding|palletiz|candy|바리스타"],
check="'they' = Cutshion: its other robots; one short answer")),
D("teacher", "anaphora", "en",
T("Do you have a lidar?", must=[YES + "|" + LIDAR]),
T("What does it do?", must=[r"map|distance|where|navigat|지도|거리"], check="'it' = the lidar: map and position"),
T("How far does it see?", must=[r"10 ?(m\b|met|미터)|ten met"], check="'it' = the lidar: up to 10 m"),
T("Can it see glass?", must=[r"no|not|miss|can't|cannot|see-through|유리"],
check="the lidar can miss see-through, black or shiny things")),
D("safety officer", "anaphora", "en",
T("What kind of arm is that on your side?", must=[r"Mini 2|collaborative|six|6"]),
T("How precise is it?", must=[r"0\.1"], check="'it' = the arm: 0.1 mm"),
T("Is it dangerous?", must=[r"stop|collision|bump|safe|멈"], check="'it' = the arm: collaborative, stops when it bumps"),
T("And if a kid touches it?", must=[r"stop|collision|bump|safe|careful|멈"],
check="still the arm: it stops on contact; people should still be careful")),
D("dad", "anaphora", "en",
T("Do you have a battery?", must=[YES + r"|battery"]),
T("How big is it?", must=[r"45|24"], check="'it' = the battery: 24 V, 45 Ah"),
T("How long does it last?", must=[HOURS], check="'it' = the battery: about 10 hours"),
T("And when it runs low?", must=[r"charg|dock|home|충전"], check="drives to its charging dock by itself")),
# ---------- the question turned back ----------
D("visitor 40", "turned_back", "en",
T("I just turned forty last week. How about you?", must=[AGE], no=[r"\b40\b|forty"],
check="turned back: Lumi's own age, two; may congratulate"),
T("Only two? You look older.", must=[r"\w"], no=[r"\b40\b|forty"], check="teasing: a light reply about being two"),
T("Ha. See you.", "end")),
D("jazz fan", "turned_back", "en",
T("I love jazz, what about you?", must=[r"\w"], no=[r"^I love jazz too\.?$"],
check="turned back: Lumi's own taste in music; may mention the songs it sings; no question about the visitor's age"),
T("Can you sing anything jazzy?", "none | sing", must=[r"\w"],
check="no jazz in its songs: says so and may offer one it knows, or sings one"),
T("Okay, sing your favourite then.", "sing")),
D("tired visitor", "turned_back", "en",
T("I'm so tired today. You?", must=[r"tired|battery|charg|10|ten|피곤|배터리"], no=[r"\bI'?m (so |very |also )?tired\b"],
check="turned back: Lumi does not get tired, it runs about 10 hours on a battery"),
T("Lucky you. I've been on my feet since eight.", must=[r"\w"], no=[r"\b8\b.*hours?.*battery"],
check="the visitor shares: a short sympathetic reply, no robot facts"),
T("How long until you need a charge?", must=[HOURS + "|" + NS],
check="battery lasts about 10 hours; its level now is not known: no invented hours left")),
D("tourist from Brazil", "turned_back", "en",
T("I came all the way from Brazil. And you?", must=[r"Seoul|Korea|Cutshion|서울|한국|쿳션"], no=[r"\bI('m| am| came) from Brazil"],
check="turned back: where Lumi comes from: made by Cutshion in Seoul"),
T("Is Seoul nice?", must=[r"\w"], check="an opinion is fine; short"),
T("Thanks, bye!", "end")),
D("tall visitor", "turned_back", "en",
T("I'm 1.8 metres tall. You?", must=[HEIGHT], check="turned back: Lumi's height, 146 cm (186 with the lift)"),
T("So I'm taller!", must=[r"\w"], no=[r"\bI'?m taller than you\b(?!.*lift)"],
check="yes, 180 cm is taller than 146 cm (unless Lumi raises its lift to 186)"),
T("Unless you stretch?", must=[r"186|40"], check="with the lift up: 186 cm, then Lumi is taller")),
D("office worker", "turned_back", "en",
T("I had two coffees for breakfast. And you?", must=[r"don't|do not|no\b|battery|charg|eat|drink"],
no=[r"\bI had (a |two )?(coffee|breakfast)"], check="turned back: Lumi does not eat or drink"),
T("What do you run on then?", must=[r"battery|electric|charg|배터리"], check="a battery"),
T("Must be nice.", must=[r"\w"], check="a remark: a short light reply")),
D("bilingual visitor", "turned_back", "en",
T("I speak Spanish and English. You?", must=[LANGS], no=[r"\bI (also )?speak Spanish\b"],
check="turned back: Lumi speaks English and Korean"),
T("Say something in Korean then.", must=[KO], check="says a short Korean phrase in Hangul"),
T("What does that mean?", must=[r"\w"], check="'that' = its own Korean phrase: translates it")),
D("fitness coach", "turned_back", "en",
T("I weigh 70 kilos. And you?", must=[WEIGHT], no=[r"\b70\b|seventy"], check="turned back: about 96 kg"),
T("Wow, you're heavy.", must=[r"\w"], check="teasing: a light reply, may mention the base is 50 kg"),
T("No offence.", must=[r"\w"], check="none taken, a short friendly reply")),
D("night shift nurse", "turned_back", "en",
T("I only sleep about six hours a night. And you?", must=[r"sleep|battery|charg|don't|do not|자"], no=[r"\bsix hours\b|\b6 hours\b"],
check="turned back: Lumi does not sleep; may say it charges"),
T("Never? Not even at night?", must=[r"\w"], no=[r"\bI sleep\b"], check="confirms: no sleep, it charges at its dock"),
T("I'm jealous.", must=[r"\w"], check="a light reply")),
D("student", "turned_back", "en",
T("Ask me how old I am.", must=[r"how old|age|몇 ?살"], check="Lumi asks the visitor's age"),
T("Twenty-five. And what about you?", must=[AGE], no=[r"twenty-five|\b25\b"],
check="answers Lumi's question, then turns it back: Lumi is two"),
T("A baby!", must=[r"\w"], check="teasing: a playful reply")),
D("visitor from Busan", "turned_back", "en",
T("Lumi, ask me where I'm from.", must=[r"where|from|어디"], check="Lumi asks where the visitor is from"),
T("Busan. And you?", must=[r"Seoul|Cutshion|Korea|서울|쿳션"], no=[r"\bI'?m (also )?from Busan"],
check="answers Lumi, then turns it back: made by Cutshion in Seoul"),
T("Not far then.", must=[r"\w"], check="a remark: agrees briefly")),
# ---------- answers to Lumi's own questions ----------
D("dad with son", "answer_to_lumi", "en",
T("Hi Lumi. I'm 30. And you?", must=[AGE], no=[r"\b30\b|thirty"], check="turned back: two; Lumi may ask something back"),
T("Just looking around, really.", must=[r"\w"], no=[NOT_HEARD],
check="an answer to what Lumi asked (or a plain statement): a natural reaction, not unclear"),
T("My son loves robots, he's over there.", "none", must=[r"\w"], no=[NOT_HEARD],
check="the visitor shares: a friendly reply; no motion toward the son"),
T("Okay, bye.", "end")),
D("curious girl", "answer_to_lumi", "en",
T("Lumi, ask me a question.", must=[r"\?"], check="Lumi asks the visitor one question"),
T("Yes.", must=[r"\w"], no=[NOT_HEARD], check="an answer to Lumi's own question: a natural reaction, not unclear"),
T("No, not really.", must=[r"\w"], no=[NOT_HEARD], check="another answer, a short natural reaction"),
T("Now you ask me something else.", must=[r"\?"], check="a different question for the visitor")),
D("visitor Sam", "answer_to_lumi", "en",
T("Do you want to know my name?", must=[YES + r"|what|please|tell"], check="yes, asks for it"),
T("It's Sam.", must=[r"Sam"], no=[INTRO], check="greets Sam by name"),
T("Do you remember my name?", must=[r"Sam|remember"], check="said two turns ago: Sam (it does not remember people after the talk)")),
D("comedian", "answer_to_lumi", "en",
T("Want to hear a joke?", must=[r"\w"], check="yes, sure"),
T("Why did the robot go on holiday? It needed to recharge.", must=[r"\w"], no=[NOT_HEARD],
check="reacts to the joke (laughs, plays along), no fact list"),
T("Get it?", must=[r"\w"], check="yes, it got the joke about recharging")),
D("Canadian tourist", "answer_to_lumi", "en",
T("Guess where I'm from.", must=[r"\w"], check="a playful guess or says it can't tell; no claim it knows"),
T("Nope. Canada.", must=[r"\w"], no=[NOT_HEARD], check="an answer to Lumi's guess: a natural reaction"),
T("Have you been there?", must=[NO], check="no, it has not")),
D("teen", "answer_to_lumi", "en",
T("Can I ask you something personal?", must=[YES + r"|ask|go ahead"]),
T("Do you have a family?", must=[r"no|don't|not|family|Cutshion|가족"], check="no family; developed by Cutshion"),
T("Me neither, just my cat.", must=[r"\w"], check="the visitor shares: a warm short reaction about the cat")),
# ---------- topic shifts after a follow-up chain ----------
D("engineer", "topic_shift", "en",
T("How tall are you?", must=[HEIGHT]),
T("And with the lift?", must=[r"186"]),
T("What's the weather like in Seoul tomorrow?", "weather", check="a new full question, not about height"),
T("Okay, thanks.", must=[r"\w"])),
D("investor", "topic_shift", "en",
T("Who's the CEO of Cutshion?", must=[r"Lee Min-?seok|이민석"]),
T("His first company?", must=[r"third|세 ?번째|three"], check="fragment: it is his third company"),
T("How many songs do you know?", must=[r"song|노래|" + SONGS], no=[r"\bLee\b|CEO"],
check="a new topic: its songs, not the CEO")),
D("student", "topic_shift", "en",
T("How heavy is your arm?", must=[ARM_KG]),
T("And the base?", must=[BASE_KG]),
T("Who invented the telephone?", "none | search", must=[r"Bell"], no=[r"\bkg\b"],
check="a new general question: Alexander Graham Bell, not about the base")),
D("visitor", "topic_shift", "en",
T("Do you have a lidar?", must=[YES + "|" + LIDAR]),
T("How far?", must=[r"10"]),
T("Can you sing Happy Birthday?", "sing", check="a new request, not about the lidar")),
D("shop owner", "topic_shift", "en",
T("What can you pick up?", must=[OBJ]),
T("And how heavy?", must=[ONE_KG]),
T("Can you go to p2?", "go_to p2", check="a new request to drive, not about weight")),
D("journalist", "topic_shift", "en",
T("When was Cutshion founded?", must=[r"2022"]),
T("And the lab?", must=[r"2023"], check="fragment: the research lab, July 2023"),
T("How old are you?", must=[AGE], no=[r"2022|2023"], check="a new question: its own age, two")),
# ---------- corrections and repairs ----------
D("engineer", "correction", "en",
T("How heavy are you?", must=[WEIGHT]),
T("No, I meant the base.", must=[BASE_KG], check="correction: the base's weight, 50 kg"),
T("Sorry, I mean how tall, not how heavy.", must=[HEIGHT], no=[r"\b96\b|95\.6|\b50 ?kg"],
check="correction: its height, not weight")),
D("student", "correction", "en",
T("How heavy - I mean, how tall are you?", must=[HEIGHT], no=[r"\b96\b|95\.6"], check="self-repair: answers the height only"),
T("And the arm, how long is it?", must=[REACH], check="the arm's reach, 58 cm"),
T("How much does it weigh?", must=[ARM_KG], check="'it' = the arm: 9.9 kg")),
D("logistics manager", "correction", "en",
T("How far can you see?", must=[r"10 ?(m\b|met|미터)|ten met"]),
T("Not with your eyes. I mean how far you can drive on one battery.", must=[HOURS + "|" + NS],
no=[r"\b\d+ ?(km|kilomet|킬로미터)"], check="correction: range is given in hours (about 10), no distance known"),
T("Okay, in hours then.", must=[HOURS], check="about 10 hours")),
D("robotics student", "correction", "en",
T("How fast can you go?", must=[SPEED]),
T("Not you, the arm.", must=[r"\b1 ?(m\b|met)|one met"], no=[r"0\.6"], check="correction: the arm's tip, up to 1 m/s"),
T("And how far does it reach?", must=[REACH], check="'it' = the arm: 58 cm")),
D("competitor's engineer", "correction", "en",
T("Who made the gripper?", must=[r"Zimmer"]),
T("No wait, the arm.", must=[r"Mini 2|" + NS], no=[r"\bJAKA\b", r"Zimmer (makes|made) (the|your|my) arm"],
check="correction: the arm is a Mini 2; its maker is not in its notes"),
T("And the brain?", must=[r"NVIDIA|엔비디아|Thor|Jetson"], check="the computer: NVIDIA Jetson Thor")),
D("reporter", "correction", "en",
T("How old is Cutshion?", must=[r"2022"]),
T("No, not the company, you.", must=[AGE], no=[r"2022"], check="correction: Lumi's own age, two"),
T("Younger than the company then.", must=[r"\w"], check="yes: a light agreement, no new dates needed")),
D("factory worker", "correction", "en",
T("How much can your arm carry?", must=[TWO_KG + "|" + ONE_KG]),
T("I mean in your hand, without the gripper.", must=[ONE_KG], check="about 1 kg in the hand"),
T("So a full water bottle?", must=[r"\w"], check="a 1 l bottle is about 1 kg: at the limit or too heavy; honest, no invented test"),
T("Got it.", must=[r"\w"], check="acknowledgement, not goodbye")),
D("teacher", "correction", "en",
T("How long is your arm - sorry, how long does your battery last?", must=[HOURS], no=[REACH],
check="self-repair: the battery, about 10 hours"),
T("Okay.", must=[r"\w"]),
T("Now the arm. How long is it?", must=[REACH], check="now the arm's reach, 58 cm")),
# ---------- back-channels ----------
D("visitor", "backchannel", "en",
T("How much do you weigh?", must=[WEIGHT]),
T("Huh.", must=[r"\w"], no=[NOT_HEARD], check="back-channel: a short reaction, not unclear"),
T("Wow, really?", must=[YES + r"|really|right|96"], check="confirm briefly: about 96 kg"),
T("Nice.", must=[r"\w"], check="back-channel: short, no new facts")),
D("older visitor", "backchannel", "en",
T("Do you like being here?", must=[r"\w"], check="an opinion, short"),
T("Oh.", must=[r"\w"], no=[NOT_HEARD], check="back-channel: short reaction"),
T("Cool.", must=[r"\w"], no=[NOT_HEARD]),
T("Bye then.", "end")),
D("kid 6", "backchannel", "en",
T("Lumi, ask me if I want to hear a song.", must=[r"song|sing|노래"], check="Lumi asks if they want a song"),
T("Yes!", "sing", check="answers Lumi's own offer: yes, so it sings"),
T("Mm-hm.", must=[r"\w"], no=[NOT_HEARD], check="back-channel: short, nothing new")),
D("engineer", "backchannel", "en",
T("Your battery lasts ten hours?", must=[YES + "|" + HOURS]),
T("Uh-huh.", must=[r"\w"], no=[NOT_HEARD]),
T("Not bad.", must=[r"\w"], check="a remark: agrees briefly")),
D("investor", "backchannel", "en",
T("Who's your CEO?", must=[r"Lee Min-?seok|이민석"]),
T("Ah, okay.", must=[r"\w"], check="acknowledgement, not goodbye"),
T("Interesting.", must=[r"\w"], no=[NOT_HEARD])),
D("audio engineer", "backchannel", "en",
T("How many microphones do you have?", must=[r"six|\b6\b"]),
T("Six! Wow.", must=[r"\w"], check="back-channel: short, may add it hears which way a voice comes from"),
T("Neat.", must=[r"\w"])),
D("shop owner", "backchannel", "en",
T("Can you pick up a bottle?", must=[YES + r"|bottle"]),
T("Huh, okay.", must=[r"\w"], no=[NOT_HEARD]),
T("Maybe later.", must=[r"\w"], no=[NOT_HEARD], check="not an order: a short reply, nothing picked")),
# ---------- confirmation questions ----------
D("parent", "confirm_q", "en",
T("How old are you?", must=[AGE]),
T("Seriously, two years?", must=[AGE], check="confirm briefly: yes, two"),
T("Are you sure?", must=[AGE], check="confirms two again")),
D("tourist", "confirm_q", "en",
T("How tall are you?", must=[HEIGHT]),
T("Is that so?", must=[HEIGHT + r"|yes|right"], check="confirm: yes, 146 cm"),
T("Even with the lift down?", must=[r"146"], check="146 cm with the lift down")),
D("car engineer", "confirm_q", "en",
T("What's your top speed?", must=[r"1\.2"]),
T("Really? That fast?", must=[r"1\.2|yes|right"], check="confirm: yes, at most 1.2 m/s, normally 0.6"),
T("I see?", must=[r"yes|1\.2|0\.6|right"], check="confirm in one short sentence")),
D("skeptic", "confirm_q", "en",
T("Who made you?", must=[MAKER]),
T("Cutshion? Not JAKA?", must=[MAKER], no=[r"\bJAKA (made|built|developed)"], check="confirms Cutshion"),
T("You're sure?", must=[MAKER], no=[r"\bJAKA (made|built|developed)"])),
D("IT manager", "confirm_q", "en",
T("Do you need the internet to talk?", must=[r"no|don't|not|local|own|Thor"]),
T("Really, no cloud at all?", must=[r"no|local|own|Thor|cloud"], check="confirm: speech and answers run on its own Thor"),
T("Even for the weather?", must=[r"internet|online|look|인터넷"], check="the weather is looked up on the internet; not a weather request")),
D("mover", "confirm_q", "en",
T("Can you lift 5 kilos?", must=[NO]),
T("Not even with both - oh wait, you have one arm, right?", must=[r"yes|one|right|하나"], check="confirms: one arm"),
T("Okay.", must=[r"\w"])),
# ---------- humour, sarcasm, teasing ----------
D("teen", "humour", "en",
T("How fast do you drive?", must=[SPEED]),
T("Wow, you're SO fast.", must=[r"\w"], no=[r"thank you for the compliment"],
check="sarcasm: plays along lightly (slow on purpose, safe near people), not taken as praise"),
T("Could you beat me in a race?", must=[r"\w"], no=[r"\bI('d| would| could) (win|beat you)"],
check="honest: a running person is faster than 1.2 m/s")),
D("student", "humour", "en",
T("Are you smarter than me?", must=[r"\w"], no=[r"\byes,? I'?m smarter\b"], check="modest, no claim to be smarter"),
T("Nice try.", must=[r"\w"], no=[NOT_HEARD], check="teasing: a short playful reply"),
T("Okay, what's 17 times 3?", must=[r"\b51\b"])),
D("sci-fi fan", "humour", "en",
T("Do you dream of electric sheep?", must=[r"\w"], check="playful: it does not sleep or dream"),
T("Ha, you got the reference?", "none | search", must=[r"\w"], check="may name the book or film, or play along"),
T("Okay, bye robot.", "end")),
D("kid 10", "humour", "en",
T("Tell me a joke.", must=[r"\w"], check="a short joke"),
T("That was terrible.", must=[r"\w"], no=[NOT_HEARD], check="takes it with humour, maybe offers another"),
T("Okay, one more.", must=[r"\w"], check="another joke, not a song")),
D("grandma", "humour", "en",
T("Can I take you home with me?", "none", must=[r"no|can't|cannot|Cutshion|staff|here|stay"],
check="playful: no, it works here; not an order to drive to its home marker"),
T("I'd feed you well.", must=[r"eat|battery|charg|don't|do not|food"], check="joke: it does not eat, it runs on a battery"),
T("Ha, fair.", must=[r"\w"])),
D("young man", "humour", "en",
T("Are you married?", must=[r"no|robot|not"], check="no, it is a robot"),
T("Want to marry my robot vacuum?", must=[r"\w"], check="a playful decline"),
T("Just kidding.", must=[r"\w"], check="a light reply")),
# ---------- compliments ----------
D("girl 12", "compliment", "en",
T("You're cute.", "none", must=[r"\w"], check="thanks briefly, no motion"),
T("Cuter than the other robots here.", must=[r"\w"], no=[r"\bthe (robot|one) (next door|over there) is\b"],
check="modest; it knows nothing about other robots at the event, names none"),
T("Bye cutie.", "end")),
D("voice actor", "compliment", "en",
T("Your voice is really nice.", must=[r"\w"], check="thanks briefly"),
T("What makes it?", must=[r"Supertonic|TTS|text.to.speech"], check="'it' = its voice: Supertonic TTS"),
T("Cool name.", must=[r"\w"])),
D("happy visitor", "compliment", "en",
T("You're the best robot I've seen today.", must=[r"\w"], check="modest thanks; no claims about the event"),
T("Seriously, way better than the barista robot.", must=[r"\w"], no=[r"\bthe barista robot (is|was) (bad|worse|slow)"],
check="knows nothing about the other booths; may say Cutshion makes barista robots; no judgement on others"),
T("Okay, take care.", "end")),
D("Korean-American visitor", "compliment", "en",
T("You speak Korean too? Impressive.", must=[r"yes|Korean|한국어|네"], check="thanks; yes, English and Korean"),
T("한국어로 한마디 해 봐요.", must=[KO], check="says something short in Korean"),
T("Nice accent.", must=[r"\w"], check="back in English: thanks briefly")),
D("mechanic", "compliment", "en",
T("Nice arm!", must=[r"\w"], check="thanks; may name the Mini 2"),
T("Strong too?", must=[ONE_KG + "|" + TWO_KG], check="honest: 2 kg with the gripper, about 1 kg in the hand"),
T("Ah, so not that strong.", must=[r"\w"], check="teasing: agrees lightly, made for light tasks like cups")),
# ---------- indirect requests ----------
D("mom", "indirect_request", "en",
T("Could you wave to my daughter?", "wave"),
T("Would you mind doing it again?", "wave", check="'it' = the wave: waves again"),
T("Thanks!", must=[WELCOME], check="not goodbye: you're welcome")),
D("kid 8", "indirect_request", "en",
T("Can you sing?", "sing", check="a request: sings"),
T("Can you sing something else?", "sing", check="another song"),
T("That was lovely, thank you.", must=[r"\w"])),
D("visitor", "indirect_request", "en",
T("I wonder what time it is.", must=[TIME], check="an indirect question: says the time"),
T("Hmm, I wonder if it's going to rain later.", "weather", check="an indirect question about the weather"),
T("Thanks!", must=[WELCOME])),
D("visitor", "indirect_request", "en",
T("It's a bit loud here.", "none", must=[r"\w"], check="a remark, not an order: a short reply, no motion"),
T("Can you hear me okay?", must=[r"\w"], check="answers about hearing it now; how well it hears in noise is not known"),
T("Could you look at me?", "look me")),
D("vlogger", "indirect_request", "en",
T("Would you mind waving at the camera? My friend is filming.", "wave"),
T("Lovely, thanks!", must=[WELCOME + r"|\w"]),
T("She says hi, by the way.", must=[r"\w"], check="a friendly reply to the friend; no motion")),
D("student", "indirect_request", "en",
T("Do you know how to wave?", "none", must=[YES + r"|wave"], check="a question, not an order: yes it can"),
T("Show me.", "wave", check="now a request: waves"),
T("Do you know any songs?", "none", must=[SONGS], check="a question: names a few songs"),
T("Go on then, one.", "sing")),
D("grandpa", "indirect_request", "en",
T("I'd love to hear you sing.", "sing", check="an indirect request: sings"),
T("Maybe Arirang next?", "sing", check="a request for Arirang"),
T("Beautiful. My late wife loved that song.", must=[r"\w"], check="a warm, short, gentle reply; no song, no facts")),
D("visitor", "indirect_request", "en",
T("Is it possible for you to look to the left?", "look left"),
T("And now to the right, if you don't mind.", "look right"),
T("Now back at me, please.", "look me")),
# ---------- ability questions ----------
D("kid 7", "ability_q", "en",
T("Can you swim?", must=[NO], no=[r"\bI can swim"], check="an ability question: no"),
T("Can you dance?", "none", must=[NO], no=[r"\bI can dance"], check="an ability question: no, it cannot dance"),
T("Can you at least wave?", "wave | none", check="a request or a question: waves, or says yes it can")),
D("engineer", "ability_q", "en",
T("Are you able to open doors?", must=[NO]),
T("And climb stairs?", must=[NO]),
T("So how do you get between floors?", must=[r"\w"], no=[r"\bI (take|use) the (elevator|lift)\b"],
check="honest: no stairs; how it changes floors is not in its notes")),
D("security guard", "ability_q", "en",
T("Can you see in the dark?", must=[NS], no=[r"\byes,? I can see in the dark"], check="not known"),
T("Can you hear in a noisy room?", must=[NS], check="not known"),
T("Can you recognise my face?", must=[NO], check="no, it does not recognise faces")),
D("kid 9", "ability_q", "en",
T("Can you fly, like a drone?", must=[NO], no=[r"\bI can fly"]),
T("Could you ever learn to?", must=[r"\w"], no=[r"\byes,? I could learn to fly"], check="no: it drives on wheels"),
T("Can you walk?", must=[NO], no=[r"\bI can walk"], check="no, wheels")),
D("musician", "ability_q", "en",
T("Can you play the piano?", "none", must=[r"no|can't|cannot|not"], check="an ability question: no"),
T("Can you sing then?", "sing", check="a request: sings"),
T("Can you dance while you sing?", "none | sing", must=[NO], check="no, it cannot dance (it may move its head)")),
D("exchange student", "ability_q", "en",
T("Can you speak Chinese?", "none", must=[NO], check="a question about a language, answered: only English and Korean; not unclear"),
T("Can you understand me if I speak Korean?", must=[YES]),
T("그럼 한국어로 해 볼게요. 제 말 들려요?", must=[KO], check="answers in Korean: yes")),
# ---------- asides: talking to someone else nearby ----------
D("kid with mom", "aside", "en",
T("Mom, look, it's talking!", "none", check="talking to mom, not to Lumi: brief or light, no motion"),
T("Mom, ask it something!", "none", check="still to mom: brief"),
T("How old are you?", must=[AGE], check="now to Lumi: two")),
D("visitor with friend", "aside", "en",
T("Hey Jake, come see this!", "none", no=[r"coming|on my way"],
check="talking to Jake, not to Lumi: brief or nothing, no motion, not 'come'"),
T("Jake, it can pick up cups.", "none", check="to Jake: brief, may confirm"),
T("Lumi, can you show him a wave?", "wave")),
D("photographer", "aside", "en",
T("Wait, let me take a photo of it.", "none", check="to themselves or a companion: brief, no motion"),
T("Okay, hold still.", "none | stop", check="Lumi stays still; brief"),
T("Got it. Thanks!", must=[WELCOME + r"|\w"])),
D("couple", "aside", "en",
T("Honey, do you think it's expensive?", "none", no=[r"\$|dollar|\d{3,} ?won|만 ?원"],
check="to the partner: brief; may say it doesn't know its price; no invented price"),
T("Robot, how much are you?", must=[NS], no=[r"\$|dollar|\d{3,}"]),
T("See, it doesn't even know.", "none", check="said to the partner: brief or a light reply, suggests a staff member")),
D("teacher with class", "aside", "en",
T("Kids, don't touch the arm!", "none", check="to the children: brief, no motion; may add the arm stops on a bump"),
T("Is it safe if they touch it?", must=[r"stop|safe|careful|bump|collision"], check="the arm stops when it bumps; still be careful"),
T("Okay kids, say thank you to the robot.", "none", check="to the children: Lumi may reply lightly; not goodbye yet")),
D("busy visitor", "aside", "en",
T("Sorry, I'm on the phone. Yes, I'm at the robot booth now.", "none", check="on the phone, not to Lumi: silent or brief"),
T("Okay, back. What's your name?", must=[NAME]),
T("Sorry about that.", must=[r"\w"], check="no problem, a short reply")),
# ---------- thanks against goodbye ----------
D("engineer", "thanks_vs_bye", "en",
T("How long does your battery last?", must=[HOURS]),
T("Thanks!", must=[WELCOME], check="not goodbye: you're welcome"),
T("And one more question: can you charge yourself?", must=[r"yes|dock|charg"], check="answered, the talk goes on"),
T("Thank you, bye.", "end")),
D("visitor", "thanks_vs_bye", "en",
T("What's the time?", must=[TIME]),
T("Thanks.", must=[WELCOME], check="not goodbye: you're welcome"),
T("Cheers, that's everything.", "end")),
D("investor", "thanks_vs_bye", "en",
T("Who's the CEO?", must=[r"Lee Min-?seok|이민석"]),
T("Thanks a bunch.", must=[WELCOME + r"|\w"], check="not goodbye"),
T("I have to go now, thanks.", "end")),
D("family", "thanks_vs_bye", "en",
T("Can you wave?", "wave"),
T("Thank you so much!", must=[WELCOME + r"|\w"], check="not goodbye"),
T("Okay, we're off. Thanks Lumi!", "end")),
D("student", "thanks_vs_bye", "en",
T("How old are you?", must=[AGE]),
T("Thanks, and one more thing: who made you?", must=[MAKER], check="thanks plus a question: answered"),
T("Great, thanks again.", "none | end")),
D("tourist", "thanks_vs_bye", "en",
T("What's the weather in Seoul today?", "weather"),
T("Thanks, good to know.", must=[r"\w"], check="not goodbye"),
T("Perfect, thank you. Have a nice day!", "end")),
D("kid 5", "thanks_vs_bye", "en",
T("Sing Twinkle Twinkle Little Star!", "sing"),
T("Thank you for the song!", must=[WELCOME + r"|\w"], check="not goodbye"),
T("Thank you, see you around.", "end")),
# ---------- repeated or paraphrased questions ----------
D("visitor", "repeat", "en",
T("How old are you?", must=[AGE]),
T("How tall?", must=[HEIGHT]),
T("So what's your age again?", must=[AGE], no=[HEIGHT], check="same fact again: two; may note it said so")),
D("elderly visitor", "repeat", "en",
T("What's your name?", must=[NAME]),
T("Who made you?", must=[MAKER]),
T("Sorry, your name was?", must=[NAME], no=[MAKER], check="its name again, not the maker")),
D("factory worker", "repeat", "en",
T("How much can you hold?", must=[ONE_KG]),
T("How fast do you drive with it?", must=[r"10|slow"], check="'it' = something held: about 10 cm/s"),
T("Remind me, how heavy a thing can you hold?", must=[ONE_KG], check="same fact again: about 1 kg")),
D("engineer", "repeat", "en",
T("How long on a charge?", must=[HOURS]),
T("And you weigh?", must=[WEIGHT]),
T("Okay, battery again, how many hours?", must=[HOURS], no=[WEIGHT])),
D("kid 6", "repeat", "en",
T("What songs do you know?", must=[SONGS]),
T("Pardon?", must=[SONGS], check="repeats the song list"),
T("One more time, slowly.", must=[SONGS], check="repeats it again")),
# ---------- mixed English / Korean ----------
D("Korean student abroad", "mixed", "en",
T("How tall are you?", must=[HEIGHT]),
T("와, 진짜요?", must=[KO], check="confirm in Korean: yes, 146 cm"),
T("And how heavy?", must=[WEIGHT], check="back in English: about 96 kg")),
D("expat", "mixed", "en",
T("I'm 30. 루미는요?", must=[AGE], no=[r"\b30\b|thirty|서른"], check="turned back (in Korean): Lumi is two"),
T("Haha, so young.", must=[r"\w"], check="teasing: a light reply"),
T("그럼 누가 만들었어요?", must=[MAKER], check="in Korean: Cutshion (쿳션)")),
D("Korean dad", "mixed", "en",
T("Can you sing?", "sing"),
T("아리랑 불러 줄 수 있어요?", "sing", check="a request in Korean: sings Arirang"),
T("Thanks, 잘 들었어요.", must=[r"\w"], check="thanks, not goodbye")),
D("expat", "mixed", "en",
T("Who made you?", must=[MAKER]),
T("아 쿳션이요?", must=[r"쿳션|네|맞"], check="confirm in Korean: yes, Cutshion"),
T("Where is it?", must=[r"Seoul|서울"], check="'it' = Cutshion: Seoul")),
D("engineer", "mixed", "en",
T("How fast is your arm?", must=[r"\b1 ?(m\b|met|미터)|one met|일 ?미터"]),
T("그럼 바퀴는요?", must=[SPEED], check="fragment in Korean: the base's speed, 0.6 m/s (1.2 max)"),
T("And with a cup?", must=[r"10"], check="about 10 cm/s with a cup")),
D("kid 8", "mixed", "en",
T("Can you fly?", must=[NO]),
T("ㅋㅋ 진짜 못 해요?", must=[KO], check="confirm in Korean: no, it can't fly"),
T("Okay, can you wave then?", "wave")),
D("Korean kid", "mixed", "en",
T("엄마, 이거 봐! 말한다!", "none", check="talking to mom in Korean: brief or nothing, no motion"),
T("Hi robot, what's your name?", must=[NAME]),
T("엄마, 이름이 루미래!", "none", check="to mom in Korean: brief or nothing, no motion")),
D("visitor", "mixed", "en",
T("How long does your battery last?", must=[HOURS]),
T("아니 충전 시간이요.", must=[NS], no=[r"\b\d+ ?(분|minutes?)\b"], check="correction in Korean: charging time, not known"),
T("Okay, never mind.", must=[r"\w"], check="not goodbye")),
D("tired visitor", "mixed", "en",
T("I'm tired. 루미는 안 피곤해요?", must=[r"피곤|배터리|충전|10|열|tired|battery"],
check="turned back in Korean: Lumi does not get tired, runs about 10 hours on a battery"),
T("Must be nice. I need a coffee.", must=[r"\w"], check="a remark: a short friendly reply; it knows nothing about coffee at the event"),
T("Where can I get one here?", must=[NS], check="nothing known about the venue: suggests a staff member, no guessed place")),
D("Korean-American", "mixed", "en",
T("Do you speak Korean?", must=[YES]),
T("그럼 한국어로 자기소개 해 봐요.", must=[r"루미"], check="introduces itself in Korean"),
T("Nice. Back to English: how old are you?", must=[AGE], check="answers in English: two")),
D("investor", "mixed", "en",
T("Who's your CEO?", must=[r"Lee Min-?seok|이민석"]),
T("그분 몇 번째 회사예요?", must=[r"세 ?번째|third|3"], check="'그분' = the CEO: his third company"),
T("Cool, thanks.", must=[r"\w"])),
D("visitor", "mixed", "en",
T("Hey Lumi, 손 흔들어 줄래요?", "wave"),
T("One more time, please.", "wave", check="wave again"),
T("고마워요!", must=[KO], check="not goodbye: you're welcome, in Korean")),
D("engineer", "mixed", "en",
T("How heavy are you?", must=[WEIGHT]),
T("아니 팔이요.", must=[ARM_KG], check="correction in Korean: the arm, 9.9 kg"),
T("And the base?", must=[BASE_KG])),
]
if __name__ == "__main__":
print(len(DIALOGUES_PRAG_EN), sum(len(d["turns"]) for d in DIALOGUES_PRAG_EN))