"""Korean conversations that test how Lumi reads each utterance in its context, same format as tests/dialogues.py. Ellipsis, 그거 / 거기 / 그때, the question turned back ("너는?"), corrections, 맞장구, confirmation questions, sentence endings (-지? -네 -잖아 -거든 -더라 -ㄹ까 -나 봐 -는데...), honorifics, jokes, indirect requests against ability questions, asides to other people, thanks against goodbye, and answers to Lumi's own questions. About a fifth mix English words or turns. Lumi answers in polite Korean whatever way the visitor speaks. """ from tests.dialogues import (T, D, MAKER, AGE, NS, HEIGHT, WEIGHT, REACH, ONE_KG, TWO_KG, SPEED, HOURS, NO, YES, KO) # a Korean sentence ending in 반말 (the visitor spoke 반말; Lumi still answers politely) BANMAL = r"[가-힣](야|어|지|해|냐|거든)[.!?](\s|$)" EN = r"[A-Za-z]{3}" # Lumi does not eat or drink NO_DRINK = (r"(안|못) ?마|마시지는? (않|못)|마실 수 ?(없|는 없)|(안|못) ?먹|먹지는? (않|못)|먹을 수 ?(없|는 없)|" r"로봇이라|don't (drink|eat)|can't (drink|eat)|do not (drink|eat)|배터리|전기|충전") # Lumi does not get tired or sleep: it runs on a battery NO_TIRED = (r"피곤하지 않|안 피곤|피곤(함|을|은) (못|안|모르|느끼지)|지치지 않|안 지쳐|피곤해지지|" r"자지 않|안 자|잠을 (안|자지|못)|로봇이라|배터리|충전|열 ?시간|10 ?시간|don't get tired|don't sleep") SEOUL = r"서울|Seoul" YEAR = r"2022" ONE_SEC = r"1 ?초|일 ?초|한 ?초|one second|1 second" SIX = r"6|여섯|six" ARM_KG = r"9\.9" BASE_KG = r"50|오십" GEMMA = r"Gemma|젬마" ON_BOARD = r"Thor|토르|Jetson|젯슨|직접|로컬|안에서|아니" YOLO_MS = r"4.{0,8}13|13" PHONE = r"070.?8959.?2960" EMAIL = r"cutshion@cutshion\.com" DIALOGUES_PRAG_KO = [ # ---------- 생략 / fragments ---------- D("middle school student", "ellipsis", "ko", T("너 몸무게 몇 킬로야?", must=[WEIGHT], no=[BANMAL]), T("팔은?", must=[ARM_KG], no=[REACH + r" ?(cm|센티)", BANMAL], check="fragment after the weight: the arm's own weight, 9.9 kg, not its reach"), T("바퀴 달린 데는?", must=[BASE_KG], no=[BANMAL], check="the base's weight, 50 kg"), T("헐 무겁다", must=[KO], no=[BANMAL], check="a reaction: brief and natural, no list of facts")), D("office worker", "ellipsis", "ko", T("배터리는 얼마나 가요?", must=[HOURS]), T("충전은요?", must=[NS], no=[r"\d+ ?시간"], check="fragment: how long charging takes is not known; says so, no invented time"), T("그럼 지금은 몇 퍼센트예요?", must=[NS], no=[r"\d+ ?(%|퍼센트|프로)"], check="the battery level now is not known; says so"), T("아 그렇구나~", must=[KO], check="understood, not goodbye: a few words")), D("university student", "ellipsis", "ko", T("집게는 어디 거예요?", must=[r"Zimmer|짐머|치머"], check="the gripper is a Zimmer electric gripper"), T("그건 여닫는 데 얼마나 걸려요?", must=[ONE_SEC], check="그건 = the gripper: opens or closes in about one second"), T("폭은요?", must=[r"6.{0,6}9|육.{0,6}구"], check="fragment: the width it holds, 6 to 9 cm"), T("종이컵도 돼요?", must=[NO + r"|찌그러|눌려|납작|부드러"], check="a paper cup is too soft, the fingers squeeze it flat")), D("engineer", "ellipsis", "ko", T("평소에 얼마나 빨리 다녀요?", must=[r"0\.6"]), T("max로는요?", must=[r"1\.2"], rl="ko", check="fragment with an English word: top speed 1.2 m/s, in Korean"), T("컵 들고는요?", must=[r"10 ?(cm|센티)|0\.1"], check="with a cup about 10 cm/s"), T("계단은요?", must=[NO], check="no stairs; may add a step of at most 1.5 cm")), D("parent", "ellipsis", "ko", T("루미는 키가 몇이에요?", must=[HEIGHT]), T("제일 높이 올라가면요?", must=[r"186"], check="with the lift up to 186 cm"), T("그럼 팔 길이는요?", must=[REACH], check="the arm reaches 58 cm"), T("그 정도면 우리 애 키만 하네요.", must=[KO], no=[r"\d+ ?(cm|센티)"], check="-네 noticing: a light reaction; no invented height of the child")), D("elementary student", "ellipsis", "ko", T("오늘 날씨 어때?", "weather", no=[BANMAL]), T("내일은?", "weather", check="the same question about tomorrow"), T("밤에는?", "weather", check="fragment: the weather at night; still a weather question, not unclear")), D("foreign student", "ellipsis", "ko", T("쿳션은 언제 생긴 회사예요?", must=[YEAR]), T("그럼 몇 년 된 거예요?", must=[r"4 ?년|사 ?년|네 ?해|2022"], check="the subject is the company just talked about: about four years (since July 2022); not Lumi's age"), T("본사는요?", must=[SEOUL], check="the company's head office is in Seoul"), T("감사합니다.", must=[KO], check="thanks right after an answer: you're welcome, not goodbye")), D("elderly visitor", "ellipsis", "ko", T("이 회사 대표가 누구요?", must=[r"이민석"]), T("몇 번째 회사라고?", must=[r"세 ?번째|3 ?번째|셋째"], no=[BANMAL], check="the CEO's third company; polite reply"), T("그 양반 나이는?", must=[NS], no=[r"\d+ ?(살|세)"], check="the CEO's age is not known; no guess")), D("middle school student", "ellipsis", "ko", T("너 무슨 노래 부를 수 있어?", must=[r"아리랑|곰 ?세 ?마리|Happy Birthday|Twinkle|Fantastic|생일"], no=[BANMAL]), T("한 곡에 얼마나 걸려?", must=[r"1 ?분|일 ?분|한 ?분"], no=[BANMAL], check="fragment after the songs: a song lasts about a minute; no singing"), T("케이팝은?", must=[r"Fantastic|판타스틱|Love Attack|BAD|꿈꾸던"], no=[BANMAL], check="which K-pop songs it sings; no action")), # ---------- 지시어 anaphora ---------- D("university student", "anaphora", "ko", T("루미 머리에 있는 건 뭐예요?", must=[r"카메라|Orbbec|오브벡|Gemini|제미니"]), T("그거 얼마나 멀리 봐요?", must=[r"10 ?(m|미터)|십 ?미터"], check="그거 = the head camera: up to about 10 m"), T("밑에 있는 거는요?", must=[r"35|2 ?(m|미터)|이 ?미터|3D|3 ?차원"], check="the 3D camera at the base front: 35 cm to 2 m"), T("오 그렇구나", must=[KO])), D("engineer", "anaphora", "ko", T("음성 인식은 뭘로 해요?", must=[r"Whisper|위스퍼"]), T("그건 누가 만든 거예요?", must=[r"OpenAI|오픈 ?AI|오픈에이아이"], no=[MAKER], check="그건 = Whisper: made by OpenAI, not Cutshion"), T("대답은요?", must=[GEMMA], check="answers come from Gemma 4"), T("그것도 클라우드예요?", must=[ON_BOARD], no=[r"ChatGPT|챗GPT"], check="그것 = Gemma: runs on its own Jetson Thor, no cloud")), D("parent", "anaphora", "ko", T("저기 빨간 버튼은 뭐예요?", must=[r"비상|정지|멈"], check="the red emergency stop buttons stop the arm and the lift"), T("그거 누르면 바로 서요?", must=[YES + r"|바로|즉시|멈"], check="그거 = the emergency stop: yes, the arm and the lift stop at once"), T("애가 누르면 어떡해요?", must=[KO], check="calm: it only stops; a staff member can start it again; no invented procedure")), D("middle school student", "anaphora", "ko", T("너 대표님 이름 알아?", must=[r"이민석"], no=[BANMAL]), T("그분 회사 몇 개 했어?", must=[r"세 ?번째|3 ?번째|세 ?개|3 ?개"], no=[BANMAL], check="그분 = the CEO: this is his third company"), T("그분 MBTI는?", must=[NS], no=[r"\b[IE][NS][TF][JP]\b"], check="not known; no guess")), D("office worker", "anaphora", "ko", T("투자는 받았어요?", must=[r"5 ?억|500"], check="seed investment of 500 million won"), T("그게 언제예요?", must=[r"2025|8 ?월"], check="그게 = the investment: August 2025"), T("어디서요?", must=[r"CNT|씨엔티|에버그린|Evergreen"], check="CNT Tech and Evergreen Investment Partners"), T("그때 직원은 몇 명이었어요?", must=[NS], no=[r"\d+ ?명"], check="그때 = August 2025: the staff count then is not known; says so")), D("foreign student", "anaphora", "ko", T("루미는 어디 갈 수 있어요?", must=[r"p1|p2|p3|p4|p5|홈|home|dock|지도|맵|장소"], check="names the places on its map or says it goes to the places on its map"), T("거기까지 얼마나 걸려요?", must=[KO], no=[r"\d+ ?(분|초)"], check="거기 is unclear (several places): asks which place or says it depends; no invented time; no drive"), T("p1이요.", "none", must=[KO], no=[r"\d+ ?(분|초)"], check="a fragment naming the place for the time question, not an order to drive: no invented time, no go_to"), T("아 안 가도 돼요 ㅎㅎ", "none", must=[KO], check="confirms it stays; no motion")), D("elementary student", "anaphora", "ko", T("아까 걔는 이름이 뭐야?", must=[KO], no=[BANMAL], check="걔 has no earlier referent: asks who they mean or says it does not know; no guessed name"), T("저기 컵 옮기던 로봇", must=[KO], no=[BANMAL, r"루미예요|저예요"], check="another robot at the event: Lumi does not know it; says so or suggests staff; no guess"), T("너도 몰라?", must=[NS + r"|몰라요|모르"], no=[BANMAL], check="confirms it does not know that robot")), D("engineer", "anaphora", "ko", T("팔은 모델이 뭐예요?", must=[r"Mini ?2|미니 ?2|미니 ?투"]), T("그거 몇 축이에요?", must=[SIX], check="그거 = the arm: six joints"), T("거기에 달린 건요?", must=[r"Zimmer|짐머|치머|그리퍼|집게"], check="거기 = the arm: the Zimmer gripper on it"), T("그건 무게가 얼마나 돼요?", must=[NS + r"|1 ?(kg|킬로)"], no=[r"0\.\d+ ?(kg|킬로)"], check="그건 = the gripper: the arm carries 2 kg including the gripper, about 1 kg in the hand; no invented gripper weight")), # ---------- the question turned back ---------- D("middle school student", "turned_back", "ko", T("나 열다섯 살이야. 너는?", must=[AGE], no=[r"열다섯|15", BANMAL], check="turned back: Lumi says it is two"), T("헐 나보다 어리네", must=[KO], no=[BANMAL], check="-네 noticing: agrees playfully"), T("그럼 형이라고 불러", must=[KO], no=[BANMAL], check="playful; may agree to call them 형, stays polite; no action")), D("office worker", "turned_back", "ko", T("저는 커피 좋아해요. 루미는요?", must=[NO_DRINK], no=[r"저도 (커피|좋아)"], check="turned back: Lumi does not drink; may say something friendly about coffee"), T("그럼 뭐 먹어요?", must=[r"전기|배터리|충전|안 ?먹|먹지|못 ?먹"], check="eats nothing, runs on a battery"), T("부럽네요 ㅎㅎ", must=[KO], check="a light reaction, no list")), D("university student", "turned_back", "ko", T("아 오늘 너무 피곤하다. 너도 피곤해?", must=[NO_TIRED], no=[r"저도 (너무 )?피곤|네,? 피곤"], check="turned back: a robot does not get tired; about 10 hours on a battery; may sympathize"), T("좋겠다. 나는 밤샜는데", must=[KO], no=[BANMAL], check="sympathizes briefly; no lecture"), T("너는 잠 안 자?", must=[NO_TIRED], no=[BANMAL], check="does not sleep; charges instead")), D("parent", "turned_back", "ko", T("저는 서울 살아요. 그쪽은요?", must=[SEOUL + "|" + MAKER], no=[r"저도 서울 살"], check="turned back: Lumi does not live anywhere; it was made by Cutshion in Seoul"), T("아 같은 동네네요.", must=[KO], check="-네 noticing: a friendly word"), T("저는 이번 주말에 제주도 가요. 루미는 여행 가 봤어요?", must=[KO], no=[r"제주도에? 가 봤"], check="turned back: it has not travelled; it drives only on its map; no invented trips"), T("가고 싶은 데는요?", must=[KO], check="an opinion is fine, brief; no drive")), D("elementary student", "turned_back", "ko", T("나는 떡볶이 제일 좋아해! 넌?", must=[NO_DRINK], no=[r"저도 떡볶이", BANMAL], check="turned back: a robot does not eat; may say what it likes instead"), T("그럼 뭐 좋아해?", must=[KO], no=[BANMAL], check="an opinion is fine: e.g. talking with people, singing"), T("오 노래?", "none", must=[KO], no=[BANMAL], check="a confirming echo, not a request: says yes it likes singing, may offer; does not start singing")), D("engineer", "turned_back", "ko", T("저는 Python으로 일해요. 루미는요?", must=[KO], no=[r"저도 (Python|파이썬)으로 일"], rl="ko", check="turned back on 'what you work with': no invented programming language; may name Whisper / Gemma on its Thor or say it is not sure"), T("ROS 써요?", must=[NS], rl="ko", check="whether it uses ROS is not known; says so"), T("그것도 몰라요? ㅎㅎ", must=[KO], check="takes the tease lightly; still no guess about ROS")), D("elderly visitor", "turned_back", "ko", T("나는 손주가 셋이야. 자네는 가족이 있나?", must=[r"없|로봇|쿳션|Cutshion"], no=[r"(셋|세 ?명) 있", BANMAL], check="turned back: a robot has no family; may mention the people at Cutshion who made it"), T("허허, 외롭겠구먼.", must=[KO], no=[BANMAL], check="kindly: it is not lonely, it meets many people; polite"), T("그럼 쿳션이 자네 부모인 셈이구먼.", must=[KO], no=[BANMAL], check="agrees warmly: Cutshion made it; polite")), D("university student", "turned_back", "ko", T("나한테 질문 하나 해 봐", must=[r"\?"], no=[BANMAL], check="Lumi asks the visitor one short question"), T("음 나는 공대생이야. 너는 뭐 하는 로봇이야?", must=[KO], no=[BANMAL], check="answers Lumi's question, then turns it back: what it does in one or two sentences"), T("오 괜찮네", must=[KO], no=[BANMAL])), D("office worker", "turned_back", "ko", T("저 키 175예요. 루미는요?", must=[HEIGHT], no=[r"175"], check="turned back: Lumi is 146 cm"), T("어? 제가 더 크네요.", must=[KO], no=[r"175"], check="agrees; may add it reaches 186 cm with the lift"), T("몸무게도 제가 이길걸요?", must=[WEIGHT], check="playful: Lumi weighs about 96 kg")), D("foreign student", "turned_back", "ko", T("저는 우즈베키스탄에서 왔어요. 루미는 어디서 왔어요?", must=[MAKER + "|" + SEOUL], no=[r"우즈베키스탄에서 왔"], check="turned back: made by Cutshion in Seoul"), T("한국어 어려워요. 루미는 안 어려워요?", must=[KO], check="kindly: it speaks Korean and English; encourages; no lecture"), T("저 한국어 잘해요?", must=[KO], check="a kind honest compliment; no grammar lesson")), D("middle school student", "turned_back", "ko", T("나 이번 주 시험이야. 너도 시험 봐?", must=[r"안 ?봐|없|보지 않|로봇"], no=[r"저도 시험", BANMAL], check="turned back: Lumi has no exams; wishes luck"), T("ㅋㅋ 부럽다", must=[KO], no=[BANMAL]), T("시험 잘 보라고 해 줘", must=[KO], no=[BANMAL], check="cheers them on, polite")), # ---------- topic shifts vs follow-ups ---------- D("university student", "topic_shift", "ko", T("팔은 얼마나 뻗어요?", must=[REACH]), T("근데 오늘 며칠이에요?", must=[r"{d}"], no=[REACH], check="a new topic: today's date; no arm facts"), T("무슨 요일이고요?", must=[r"{wdk}"], check="follow-up on the date: the weekday")), D("office worker", "topic_shift", "ko", T("배터리 몇 시간 가요?", must=[HOURS]), T("아 맞다, 근데 쿳션 전화번호 있어요?", must=[PHONE], check="'아 맞다' marks a new topic: the company phone number"), T("이메일도요.", must=[EMAIL], check="follow-up: the email too")), D("engineer", "topic_shift", "ko", T("사물 인식은 뭐로 돌려요?", must=[r"YOLO|욜로"]), T("한 장에 얼마나 걸려요?", must=[YOLO_MS], check="follow-up: 4 to 13 ms per picture"), T("그건 그렇고 오사카 날씨 어때요?", "weather", check="a new topic after 그건 그렇고: the weather in Osaka")), D("parent", "topic_shift", "ko", T("루미 이름은 무슨 뜻이에요?", must=[r"빛|Lux|럭스|미니|mini|작"]), T("아 예쁘다. 아 근데 화장실이 어디예요?", "none", must=[NS], check="a new topic: the building is not known; says not sure, suggests staff; no drive"), T("네, 물어볼게요.", must=[KO], check="ack, not goodbye")), D("middle school student", "topic_shift", "ko", T("너 무거워?", must=[WEIGHT], no=[BANMAL]), T("아 됐고, 노래나 불러 봐", "sing", no=[BANMAL], check="'됐고' drops the topic; a clear request to sing"), T("그만 그만", "stop | quiet", check="stop the song")), D("elderly visitor", "topic_shift", "ko", T("이 로봇은 어디서 만들었소?", must=[MAKER]), T("서울 회사인가?", must=[SEOUL + r"|네|맞"], no=[BANMAL], check="follow-up: yes, Seoul"), T("그나저나 요즘 경기가 어떻소?", "search | none", no=[BANMAL], check="a new open topic (the economy): looks it up or gives a short honest opinion; polite; no invented numbers")), # ---------- corrections ---------- D("office worker", "correction", "ko", T("루미 키가 몇이에요?", must=[HEIGHT]), T("아니, 키 말고 몸무게요.", must=[WEIGHT], no=[r"146"], check="correction: the weight now"), T("아 sorry, 잘못 말했다. 높이 말이에요, 제일 높이 올라가면.", must=[r"186"], rl="ko", check="self-repair: the highest it gets, 186 cm with the lift")), D("engineer", "correction", "ko", T("루미 무게가 얼마예요?", must=[WEIGHT]), T("너 말고 팔", must=[ARM_KG], no=[r"\b96\b", BANMAL], check="correction: the arm alone weighs 9.9 kg"), T("아니 팔이 드는 거", must=[ONE_KG + "|" + TWO_KG], no=[BANMAL], check="second correction: what the arm carries, 2 kg with the gripper, about 1 kg in the hand")), D("engineer", "correction", "ko", T("최고 속도가 얼마예요?", must=[r"1\.2"]), T("아니 그거 말고 팔 속도요.", must=[r"1 ?(m|미터)|초속 ?1"], no=[r"1\.2"], check="correction: the arm tip moves at up to 1 m per second"), T("카메라는 몇 개예요?", must=[r"3|세 ?개|셋"]), T("아니 마이크요, 마이크.", must=[r"6|여섯"], check="correction: six microphones")), D("parent", "correction", "ko", T("쿳션은 언제 생겼어요?", must=[YEAR]), T("아 회사 말고 루미요, 루미는 언제 만들어졌어요?", must=[AGE + "|" + NS], no=[r"2022년 ?7월"], check="correction to Lumi itself: two years old, or not sure of the date; no invented date"), T("루미는 몇 시간 일해요?", must=[HOURS]), T("죄송해요, 제 말은 충전이 몇 시간이냐는 거예요.", must=[NS], no=[r"(?