Improve quick answers and keep the held name after a failed move
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -510,3 +510,21 @@ QUICK_KINDS["faces"] = ([
|
||||
QUICK["no"] += ["what can your camera see", "what do you see with your camera", "카메라로 뭐 보여", "카메라에 뭐 보여요", "카메라 켜 줘",
|
||||
"camera on", "카메라 돌아가고 있어요", "do you recognize me", "나 알아봐", "내 얼굴 기억해", "remember my face",
|
||||
"카메라 고장 났어", "is your camera on", "카메라 켜져 있어요"]
|
||||
|
||||
# night 5: the wheeled base (how Lumi moves)
|
||||
QUICK_KINDS["wheels"] = ([
|
||||
"do you have wheels", "how many wheels do you have", "how do you move", "how do you get around", "do you roll or walk",
|
||||
"what's your base", "what kind of base do you have", "how do you drive", "are you on wheels", "what moves you around",
|
||||
"what motors do you have", "is it a differential drive", "wheels?", "how many wheel you have",
|
||||
"바퀴 있어", "바퀴 있어요", "바퀴 있니", "바퀴 있습니까", "바퀴 있노", "바퀴 몇 개야", "바퀴 몇 개예요", "바퀴 몇 개입니까", "바퀴가 몇 개고",
|
||||
"바퀴로 움직여", "바퀴로 움직여요", "바퀴로 다니세요", "바퀴로 가는 거야", "어떻게 움직여", "어떻게 움직여요", "어떻게 움직이세요",
|
||||
"어떻게 움직입니까", "어떻게 다녀요", "어떻게 이동해요", "이동은 어떻게 해", "뭘로 움직여", "뭘로 다니노", "어떻게 움직이노",
|
||||
"베이스는 어떻게 생겼어요", "모터 몇 개예요", "구동 방식이 뭐예요", "wheel 몇 개야", "너 바퀴 달렸어",
|
||||
], {"en": ["I drive on a wheeled base: two drive wheels with hub motors, a differential drive. I can't walk; I roll, normally at 0.6 m per second.",
|
||||
"On wheels: my base has two drive wheels with hub motors. It finds its way with a lidar map and can climb a step of up to 1.5 cm."],
|
||||
"ko": ["저는 바퀴 달린 베이스로 움직여요. 허브 모터가 달린 구동 바퀴 두 개로 가는 차동 구동 방식이에요. 걷지는 못하고, 보통 초속 0.6m로 다녀요.",
|
||||
"바퀴로 다녀요. 베이스에 허브 모터 구동 바퀴가 두 개 있고, 라이다 지도로 길을 찾아요. 1.5cm 정도의 턱은 넘을 수 있어요."]})
|
||||
QUICK["cameras"] = ["do you have eyes", "where are your eyes", "what are your eyes", "how many eyes do you have", "눈이 어디야", "눈 어디 있어요",
|
||||
"눈 있어", "눈 있어요", "눈이 몇 개야", "눈은 뭐예요", "눈 대신 뭐 있어요", "eyes 어디야"]
|
||||
QUICK["no"] += ["what are you made of", "뭘로 만들어졌어", "재질이 뭐예요", "무슨 재료로 만들었어요", "what material are you",
|
||||
"close your eyes", "눈 감아", "open your eyes", "눈 떠"]
|
||||
|
||||
@@ -777,3 +777,18 @@ QUICK["tts"] += ["what speech synthesis do you use", "what voice synthesis do yo
|
||||
QUICK["no"] += ["can you open the window", "open the window", "창문 열어 줘", "창문 열 수 있어", "turn on the internet", "인터넷 켜 줘",
|
||||
"connect to the wifi", "와이파이 연결해 줘", "여기 안전해", "is it safe here", "이 동네 안전해요", "is this area safe",
|
||||
"바닥 안전해", "is the floor safe"]
|
||||
QUICK["tts"] += ["do you have a speaker", "where is your speaker", "where's your mouth", "do you have a mouth", "how do you talk without a mouth",
|
||||
"스피커 어디 있어요", "스피커 있어", "스피커 있어요", "입이 어디야", "입 있어", "소리는 어디서 나와요", "목소리 어디서 나와"]
|
||||
QUICK["computer"] += ["where is your brain", "where's your brain", "where is your computer", "brain where", "뇌가 어디야", "두뇌는 어디 있어요",
|
||||
"컴퓨터 어디 들어 있어", "컴퓨터는 어디에 있어요"]
|
||||
# round 8 (own new phrasings: body and abilities kinds)
|
||||
QUICK["navigation"] = QUICK.get("navigation", []) + ["how do you find your way around", "how do you get around the room", "how do you know your way", "어떻게 길을 알아요",
|
||||
"길은 어떻게 아세요", "길 안 잃어버려"]
|
||||
QUICK["obstacles"] = QUICK.get("obstacles", []) + _ko(["사람 있으면 멈춰", "앞에 사람 있으면 서", "사람 나타나면 멈춰", "뭐가 막고 있으면 멈춰"], ["", "요", "?", "요?", "니", "나요"]) + [
|
||||
"do you stop for people", "will you stop if someone is in the way", "do you stop when someone walks in front of you"]
|
||||
QUICK["grow"] = QUICK.get("grow", []) + ["can you raise your body", "can you lift your body", "can your body go up", "몸 올라가요", "몸통 올릴 수 있어요", "상체 올라가요"]
|
||||
QUICK["teach"] = QUICK.get("teach", []) + ["can i teach you something new", "can i teach you", "can people teach you things", "can you be taught", "내가 가르쳐 줄 수 있어",
|
||||
"가르쳐 주면 배워요", "가르치면 배울 수 있으세요"]
|
||||
QUICK["no"] += ["여기 어느 나라야", "여기 어느 나라예요", "이 나라 어디야", "what country is this", "which country are we in", "where are we",
|
||||
"what does cutshion mean", "쿳션이 무슨 뜻이야", "쿳션 뜻이 뭐예요", "cutshion 이름 뜻", "추석 며칠 남았어", "설날 며칠 남았어요",
|
||||
"how many days until new year", "how many days to chuseok", "생일까지 며칠 남았어"]
|
||||
|
||||
@@ -86,7 +86,7 @@ KINDS = {
|
||||
"저는 쿳션이라는 한국 로봇 회사에서 왔어요."]}),
|
||||
"height": ([
|
||||
"how tall are you", "what's your height", "what is your height", "how tall is lumi", "how tall is this robot",
|
||||
"how high are you", "your height?", "hau tall are you", "how tall r u", "how tall can you get",
|
||||
"how high are you", "your height?", "hau tall are you", "how tall r u",
|
||||
"how tall are you in centimeters",
|
||||
"키가 몇이야", "키가 몇이에요", "키 얼마야", "키가 얼마나 돼요", "너 키 몇이야", "키 몇 센티예요", "이 로봇 키가 얼마예요",
|
||||
"키가 몇 센치고", "키 얼마나 크노", "얼마나 커요", "키 몇이에요", "your 키 몇이야",
|
||||
@@ -293,12 +293,13 @@ EVENT_TIME = re.compile(r"\b(?:what time|what day|which day|what date) (?:does|d
|
||||
OTHER_FIRM = re.compile(r"\b(?:openai|google|samsung|apple|lg|microsoft|tesla|nvidia|hyundai|naver|kakao|meta|amazon|sony)\b|"
|
||||
r"오픈 ?ai|오픈에이아이|구글|삼성|애플|엘지|마이크로소프트|테슬라|엔비디아|현대|네이버|카카오|메타|아마존|소니", re.I)
|
||||
OTHER_ROBOT = re.compile(r"\b(?:jaka|jacka|k1[wl]?|kargo|peitian|tusk)\b|자카|작카|节卡|페이톈|페이티엔|터스크|"
|
||||
r"\b(?:that|the other|other|another|those) robots?\b|(?:저|그|옆에|옆의|옆|다른) ?로봇", re.I)
|
||||
r"\b(?:that|the other|other|another|those) robots?\b|(?:저|그|옆에|옆의|옆집|옆|다른) ?로봇", re.I)
|
||||
OTHER_DAY = re.compile(r"\b(?:tomorrow|yesterday|next (?:week|month|year|monday|tuesday|wednesday|thursday|friday|saturday|sunday)|"
|
||||
r"last (?:week|month|year))\b|내일|어제|모레|그저께|글피|다음 ?주|지난 ?주|다음 ?달|지난 ?달|내년|"
|
||||
r"(?:크리스마스|성탄절?)(?:가|는|이|은)? ?(?:무슨|몇) ?요일|\b(?:what|which) day (?:is|was|will be) christmas\b", re.I)
|
||||
NAMES_LUMI = re.compile(r"\b(?:you|your|yourself|u|ur|lumi)\b|(?:^|\s)(?:너|넌|니|네|당신|루미|본인|자기)", re.I)
|
||||
|
||||
NEEDS = {"days_to_christmas": r"크리스마스|성탄|christmas|xmas|x-mas|산타|santa"} # a kind only when its word is said ("추석 며칠 남았어?")
|
||||
_bank = None
|
||||
_named = None
|
||||
_exact_kinds = None
|
||||
@@ -360,7 +361,7 @@ REMARK = re.compile(r"(?:(?:어+|아+|음+|um+|uh+)\s+)?(?:quick question|just (
|
||||
r"(?:하나 ?|뭐 ?하나 ?|질문 ?하나 ?)?(?:여쭤|여쭈어|물어) ?(?:봐|바|보)도 ?(?:될까요|돼요|되나요|됩니까|될까|돼)|"
|
||||
r"질문 ?(?:하나 ?)?(?:해도 ?(?:될까요|돼요|되나요)|있어요|있습니다|있는데요?)|궁금한 ?게 ?있(?:는데요?|어요|습니다)|"
|
||||
r"하나 ?묻겠습니다|실례합니다|실례지만|(?:may|can|could) i ask (?:you )?(?:something|a question)|"
|
||||
r"i have a question|one question)", re.I)
|
||||
r"i have a question|one question|(?:오|아|와|oh|wow)? ?(?:그래|그렇구나|그렇군요|정말|진짜|really|i see|대박|wow|cool|nice))", re.I)
|
||||
# a sentence that only asks to be told or says why: "Christmas 얼마나 남았어요? 알고 싶어요."
|
||||
SENTENCES = re.compile(r"(?<=[??!])\s*|(?<=\.)\s+")
|
||||
|
||||
@@ -432,7 +433,8 @@ def guarded(text, history=()):
|
||||
if re.search(r"충전\S*\s*(?:\S+\s+)?(?:얼마나|몇\s*시간|몇\s*분)\s*(?:\S+\s+)?걸|완충|충전\s*시간|"
|
||||
r"\bhow long\b.*\b(?:to (?:re)?charge|(?:charging|recharging|a (?:full )?charge) takes?)\b|\bcharg\w* time\b", t, re.I):
|
||||
return "charging time" # "충전하는 데 얼마나 걸려?": not known (the LLM says so), not the battery life
|
||||
if REQUEST.search(t) or re.search(r"(?:시지요|시죠|십시오|하시오|가시게|오시게|하시게|라 마|원위치)\W*$", t):
|
||||
if REQUEST.search(t) or re.search(r"(?<!알려 주)(?<!말해 주)(?<!알려주)(?<!말해주)(?<!가르쳐 주)"
|
||||
r"(?:시지요|시죠|십시오|하시오|가시게|오시게|하시게|라 마|원위치)\W*$", t):
|
||||
return "a command" # the rules' (or the LLM's), never a fact
|
||||
if re.search(r"살짜리|살 짜리|살용|살 이상", t):
|
||||
return "for an age" # "이거 몇 살짜리 장난감이야?": not Lumi's age
|
||||
@@ -457,7 +459,8 @@ ASKS = re.compile(r"[??]\W*$|\b(?:what|who|whom|whose|how|where|when|why|which
|
||||
ORDER = re.compile(r"^\W*(?:please\s+)?(?:go|come|turn|take|bring|pick|put|give|follow|wave|look|move|lift|raise|lower|stop|sing|"
|
||||
r"dance|fold|reach|grab|show|open|close|hold|drive|walk|fly|speak|say|tell|let'?s|wait|stand|sit)\b|"
|
||||
r"(?<!알려 )(?<!말해 )(?<!알려)(?<!말해)(?<!가르쳐 )(?:줘|줘요|주세요|주십시오|주시오|주라|해라|하자|가자|와라|봐라|내밀어|흔들어|돌아|돌려|들어|내려|접어|펴|가|와|멈춰|그만|"
|
||||
r"시지요|시죠|십시오|하시오|가시게|오시게|하시게|라 마|넣어|열어|닫아|놔|잡아|집어|가져와|이동해 좀|틀어|원위치)\s*[!.~…]*$", re.I)
|
||||
r"(?<!알려 주)(?<!말해 주)(?<!알려주)(?<!말해주)(?:시지요|시죠|십시오)|하시오|가시게|오시게|하시게|라 마|넣어|열어|닫아|놔|잡아|집어|가져와|"
|
||||
r"이동해 좀|틀어|원위치)\s*[!.~…]*$", re.I)
|
||||
# a command (said before a question, or as one sentence of several): never left out for the question
|
||||
REQUEST = re.compile(r"\b(?:would|could|can|will) you (?:please |kindly )?(?:go|come|turn|take|bring|pick|put|give|wave|look|move|lift|"
|
||||
r"raise|lower|fold|open|close|plug|tilt|spin|rotate)\b(?!.*\b(?:stairs?|steps?|ramps?|slopes?|doors?)\b)"
|
||||
@@ -537,7 +540,7 @@ def _kind(text, history):
|
||||
core = _core(text)
|
||||
if not sure: # "누가너를만들었습니까": a wording run together (whisper)
|
||||
best = _exact().get(_squeezed(core)) if re.fullmatch(r"\S*[가-힣]{4}\S*", core) else None
|
||||
if best in (None, "no"):
|
||||
if best in (None, "no") or best in NEEDS and not re.search(NEEDS[best], text, re.I):
|
||||
return None
|
||||
if best == "hello" and history:
|
||||
return None # hello in the middle of a talk: the LLM
|
||||
|
||||
Reference in New Issue
Block a user