Improve quick answers and song requests at every speech level

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 15:55:05 +09:00
co-authored by Claude Opus 5.5
parent e3fcfd30ab
commit b4362701b9
10 changed files with 383 additions and 63 deletions
+10 -1
View File
@@ -73,7 +73,7 @@ POS.update({
"arm": ["What sort of arm is that?", "Which robot arm do you use?", "팔은 무슨 모델이에요?", "팔 길이가 몇 센티야?", "how far is your reach?",
"팔이 어디까지 닿습니까?", "팔 하나밖에 없어?"],
"gripper": ["What kind of gripper is on you?", "How many fingers have you got?", "그리퍼는 무슨 제품이에요?", "손가락이 몇 개니?",
"집게는 뭐 써?", "can you grab a paper cup?"],
"집게는 뭐 써?"],
"lidar": ["Is there a lidar on you?", "How far can the lidar measure?", "라이다 달려 있니?", "라이다 있으십니까?", "레이저 스캐너 있어?"],
"sensors": ["Which sensors are on this robot?", "What sensors do you use?", "센서 어떤 게 달려 있어요?", "무슨 센서 있니?", "센서 몇 개 달렸노?"],
"stairs": ["Can you go up the stairs?", "Are you able to climb stairs?", "계단도 올라가니?", "계단 오르실 수 있습니까?", "턱 넘을 수 있나?",
@@ -121,6 +121,15 @@ POS.update({
})
NEG += ["does the barista robot have a lidar?", "make me a latte", "라떼 한 잔 만들어 줘", "where's the coffee robot?", "바리스타 로봇 어디 있어?",
"what is samsung?", "who is the CEO of Google?", "애플 대표가 누구야?", "커피 얼마예요?", "this cushion is comfy"]
POS.update({ # night 4, round 2
"paper_cup": ["can you grab a paper cup?", "Could you hold a paper coffee cup?", "종이컵도 집으실 수 있나요?", "종이컵 잡을 수 있겠나?",
"종이컵은 잡을 수 있습니까?"],
"arm_weight": ["How much does the arm itself weigh?", "팔 무게는 얼마나 됩니까?", "팔이 몇 kg이에요?", "팔 무게 얼마고?"],
"short_move": ["How far do you go when I say move forward?", "앞으로 가 하면 최대 몇 미터까지 가요?", "직진 최대 거리가 몇 미터입니까?"],
"llm_runtime": ["What runs Gemma for you?", "Is your model served with Ollama?", "언어 모델 돌리는 프로그램이 뭐예요?"],
})
NEG += ["move forward 4 meters", "앞으로 5미터 가 줘", "grab the paper cup", "종이컵 좀 집어 주세요", "how old is the mayor?",
"사장님 연세가 어떻게 되세요?", "who leads samsung?"]
def run():
ok = bad = miss = 0
+12
View File
@@ -33,6 +33,18 @@ ASKED = {"sing a song": True, "Lumi, sing me a song please": True, "sing Fantast
"손님 오면 그때 노래해 줘": False, "I can't sing at all": False}
wrong = {t: w for t, w in ASKED.items() if sing.asked(t) != w}
assert not wrong, wrong
ASKED2 = {"노래 싱 해 줘": True, "송 하나 불러 줘": True, "노래하나불러줘요": True, "노래 한 자락 해 줘": True, "배드 불러 주라": True,
"Love Attack 부르시게": True, "I'd love to hear Love Attack": True, "에이티즈 거 한 곡": True, "give us a song": True,
"제가 노래해도 돼요?": False, "노래 불러도 돼요?": False, "I feel bad, please": False, "택시 좀 불러 주세요": False,
"my daughter loves love attack": False}
wrong = {t: w for t, w in ASKED2.items() if sing.asked(t) != w}
assert not wrong, wrong
assert sing.asked("웅 불러 줘~", "한 곡 불러 드릴까요?") and sing.asked("앵콜!", "ACTION: sing " + F) and sing.list_asked("송 리스트 알려 줘")
for t in ["죄송한데요, 노래 하나 불러 주시겠어요?", "실례지만다른노래불러주시길부탁드립니다", "보소, 에이티즈 노래 쪼까 불러 줘", "sing anothre song",
"you sing song pleaase", "다른 노래 퍼뜩 불러 주이소"]:
assert sing.choose(t) in SONGS, t # openers, dialect, slips and words written together are no title
assert sing.choose("트로트한곡불러줘") is None and sing.choose("죄송하지만 아리랑 불러 주세요") is None
assert sing.choose("루미야 자 다음은 꿈꾸던 어른이 되었나요 불러 줘") == D
CHOSEN = {"sing Fantastic Baby": F, "판타스틱 베이비 불러 줘": F, "sing a BIGBANG song": F, "sing something by Big Bang": F,
"러브어택 틀어 줘": L_, "리센느 노래 해 줘": L_, "sing a teez song": B, "sing BAD by ATEEZ": B,
+3 -1
View File
@@ -49,10 +49,12 @@ WEATHER.update({k: "" for k in [ # night 4: casual / honorific / Konglish
"웨더 어때", "레인 와", "is it gonna rain", "what's the high today", "how's it looking outside", "do i need a coat today",
"will i need an umbrella tomorrow", "could you tell me the weather please", "may i ask about the weather today", "weather report please"]})
NEWS += ["축구 결과 알려 줘", "did korea win yesterday", "anything in the news", "what's going on in the world today", "엔화 환율 알려 줘", "주식 시장 어때요"]
NEWS += ["애플 대표 어떤 분이에요", "테슬라는 누가 이끌어요", "who leads tesla now", "구글 CEO는 어느 분입니까"]
NOT = ["do you like rainy weather", "what's your favourite weather", "is it hot in here", "you're cool", "날씨 좋아해?",
"how do you know the weather", "the news is boring", "what's your temperature",
"어떤 날씨 좋아해", "우산 어디 있어요?", "우산 잃어버렸어요", "where is my umbrella", "실내 너무 더워요", "i like the news", "are you cold", "추워?", "너 더워?",
"요즘 무슨 일 있어", "오늘 무슨 일 있었어", "what happened to you today", "what happened here today", "did you win", "새로운 소식 있어"] # about the visitor / Lumi: the LLM
"요즘 무슨 일 있어", "오늘 무슨 일 있었어", "what happened to you today", "what happened here today", "did you win", "새로운 소식 있어",
"우리 팀은 누가 이끌어요", "쿳션 대표 어떤 분이에요", "이 로봇은 누가 이끌어요"] # about the visitor / Lumi: the LLM
FOLLOW = [ # (first question, follow-up, expected place or None for "not a weather follow-up")
("what's the weather today", "and tomorrow?", ""), ("what's the weather today", "what about Busan?", "Busan"),
("what's the weather today", "and the weekend?", ""), ("what's the weather today", "what about the weekend?", ""),