Add JAKA knowledge and improve weather, news and song answers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 01:52:13 +09:00
co-authored by Claude Opus 5.5
parent 1e1862e120
commit 4fd9f3cbf4
9 changed files with 159 additions and 25 deletions
+9 -4
View File
@@ -14,7 +14,9 @@ ASKED = re.compile(r"\bwhat (?:else |all |things |kinds? of things )?(?:can|coul
r"\bwhat are you (?:able to do|capable of|good at)\b|\bwhat do you do\b(?!\s+(?:with|when|if|for fun))|"
r"\bwhat can you help (?:me |us )?with\b|\btell me (?:about )?(?:what you can do|your (?:abilities|skills))\b|"
r"\b(?:list|show me) (?:your|what you can) (?:abilities|skills|do)\b|^\W*(?:your )?(?:abilities|skills)\W*$|"
r"(?<![가-힣]로 )(?<![가-힣]으로 )(?:뭐|뭘|무엇|무엇을|뭐를)\s*(?:또\s*)?할\s*(?:수|줄)\s*(?:있|알)|"
r"\bwhat can (?:i|we) (?:ask|get|have) you (?:to )?do\b|\bwhat (?:are your|is your) (?:special )?(?:talents?|specialty|speciality)\b|"
r"(?<![가-힣]로 )(?<![가-힣]으로 )(?:뭐|뭘|머|멀|무엇|무엇을|뭐를)\s*(?:또\s*)?할\s*(?:수|줄)\s*(?:있|알|아|이써|이싸)|"
r"(?:뭐|뭘|무엇을?)\s*시킬\s*수|특기가?\s*(?:뭐|뭔|있)|무슨\s*function|"
r"무슨\s*일을?\s*(?:해|하|할)|어떤\s*(?:일|것|거|걸)을?\s*(?:할\s*수|해|하)|할\s*수\s*있는\s*(?:게|것|거|일)|"
r"뭐\s*하는\s*로봇|무슨\s*기능|어떤\s*기능|기능\S*\s*(?:뭐|뭔|있|알려)|(?:능력|기능)\S*\s*(?:뭐|뭔|알려|소개)", re.I)
MORE = re.compile(r"^\W*(?:(?:yes|yeah|yep|sure|ok|okay|please|lumi|and)\W*)*(?:tell me more|more|go on|what else|and\?|"
@@ -24,10 +26,10 @@ MORE = re.compile(r"^\W*(?:(?:yes|yeah|yep|sure|ok|okay|please|lumi|and)\W*)*(?:
r"^\W*(?:네|예|응|그래요?|좋아요?|좋아|그리고요?|또요?|또\s*뭐\S*|그\s*외에는?\S*|더\s*있어요?|더요)\W*$|또\s*뭐\s*할\s*수", re.I)
SHORT_MARK = "ACTION: none abilities" # the history line of the short overview (lumi.fixed_answer)
SHORT = {"en": "I can talk with you and answer your questions, also from the internet, and I can look at what's "
SHORT = {"en": "I'm a robot assistant: I can talk with you and answer your questions, also from the internet, and I can look at what's "
"around me and understand it. I can pick things up and bring them to you, go to places, follow you, "
"wave and even sing. Shall I tell you more?",
"ko": "저는 대화하면서 궁금한 걸 답해 드리고, 인터넷에서 찾아볼 수도 있어요. 주변을 보고 무엇이 있는지 이해할 수 있고, "
"ko": "저는 로봇 어시스턴트라서 대화하면서 궁금한 걸 답해 드리고, 인터넷에서 찾아볼 수도 있어요. 주변을 보고 무엇이 있는지 이해할 수 있고, "
"물건을 집어서 가져다드리거나, 여러 곳에 가고, 따라가고, 손을 흔들고 노래도 불러요. 더 알려 드릴까요?"}
LONG = {"en": "I talk with you in English and Korean, and when I don't know something I look it up on the internet. "
"I can look at what's around me and understand it: objects, people, what you're wearing or holding. "
@@ -41,9 +43,12 @@ LONG = {"en": "I talk with you in English and Korean, and when I don't know some
"따라가요. 그리고 손을 흔들거나 판타스틱 베이비, 러브 어택 같은 제 노래도 불러 드려요."}
NOT_LUMI = re.compile(r"\b(?:cutshion|company|jaka)\b|쿳션|회사|자카|안전", re.I) # "쿳션은 무슨 일 해?", "안전 기능 뭐 있어?"
def asked(text):
"""Do these words ask what Lumi can do? ("what can you do?", "what are your abilities", "넌 무슨 일을 해?")"""
return bool(ASKED.search(text or ""))
return bool(ASKED.search(text or "")) and not NOT_LUMI.search(text or "")
def more_asked(text, last=""):
+3 -2
View File
@@ -8,8 +8,9 @@ from robot import agv
HOW_LONG_CHARGE = re.compile(
r"\bhow (long|much time)\b.*\b(charg\w*|recharg\w*)\b|\bcharg(e|ing) time\b|\bhow fast\b.*\bcharg|"
r"충전(?:하는 ?데|에|하는데|하려면|이 다 되려면|시간)?.{0,6}(?:얼마나|몇 ?시간|시간이 ?얼마).{0,4}(?:걸려|걸리|걸릴|돼|되|이야|예요|인가)|"
r"충전 ?시간", re.I)
r"\bhow long\b.*\bfull(?:y)? charg|\bto (?:fully )?charge (?:fully|completely|all the way)\b|"
r"(?:충전|완충)(?:하는 ?데|에|하는데|하려면|이 다 되려면|까지|되려면|시간)?.{0,6}(?:얼마나|몇 ?시간|시간이 ?얼마).{0,4}(?:걸려|걸리|걸릴|돼|되|이야|예요|이에요|인가)|"
r"충전 ?시간|완충 ?시간", re.I)
ON_CHARGE = re.compile(r"\b(on|per|with) (a |one |the )?(full |single )?charge\b|\ba full charge last|\bneed (a |to )?(re)?charg|"
r"\bgo (back )?(to )?(re)?charg|한 ?번 충전(?:으로|하면)|완충(?:으로|하면|되면)|충전하면 ?(?:얼마나|몇)|"
r"충전하러", re.I) # how long it lasts (10 hours), when it goes to charge: the LLM
+76
View File
@@ -324,6 +324,82 @@ _BANK = {
},
}
# more question forms (buying, specs, unknowns, mixed Korean / English), same facts
_MORE = {
"contact": {
"en": [
("Where can I buy one of these robots?", "Please contact Cutshion: 070-8959-2960, cutshion@cutshion.com, or the contact form on cutshion.com. A staff member here can help too."),
("How do I purchase a Cutshion robot?", "The way to buy is to contact Cutshion directly, at 070-8959-2960 or cutshion@cutshion.com."),
("Who should I talk to about buying?", "A staff member here, or Cutshion itself at 070-8959-2960 or cutshion@cutshion.com."),
("Can I rent a robot for my event?", "I don't have information about rentals. Please ask Cutshion at 070-8959-2960 or cutshion@cutshion.com."),
("Give me Cutshion's email.", "It's cutshion@cutshion.com."),
("How do I reach your company?", "By phone at 070-8959-2960, by email at cutshion@cutshion.com, or through cutshion.com."),
],
"ko": [
("이 로봇 어디서 살 수 있어요?", "쿳션에 직접 문의해 주세요. 전화 070-8959-2960, 이메일 cutshion@cutshion.com이에요. 여기 직원에게 물어보셔도 돼요."),
("구매 문의는 어디로 해?", "070-8959-2960이나 cutshion@cutshion.com으로 문의하시면 돼요."),
("로봇 구입하려면 누구한테 말해야 됩니까?", "여기 직원에게 말씀하시거나, 쿳션에 070-8959-2960으로 연락하시면 됩니다."),
("행사용으로 렌탈 돼요?", "렌탈은 제가 정확한 정보가 없어요. 쿳션에 070-8959-2960으로 문의해 주세요."),
("쿳션 메일 주소 뭐야?", "cutshion@cutshion.com이에요."),
("쿳션 contact 어떻게 해요?", "전화 070-8959-2960, 이메일 cutshion@cutshion.com, 아니면 홈페이지 cutshion.com의 문의하기로 하시면 돼요."),
],
},
"products": {
"en": [
("How fast is the ice cream robot?", "About 30 seconds for one ice cream, and it holds 40 cones."),
("How big is the ice cream robot?", "The SOFTICE001 is 140 by 140 by 165 cm and weighs 500 kg."),
("How long does the candy ball robot take?", "About 20 seconds for one candy ball."),
("How much can the palletizing robot lift?", "Up to 20 kg, with one cycle taking about 15 seconds."),
("What's special about the barista robot?", "It runs a real espresso machine and does the barista's main steps itself: grinding, dosing, tamping and extracting, with the same taste every time."),
("Who uses the barista robot?", "Mega Coffee signed a yearly supply agreement in December 2025, and a deal for 200 robots to Sonovictus in the USA was reported in September 2026."),
("What is Pionoid?", "Cutshion's robot development platform: one robot API for robots from any maker, with an app store for robot apps."),
("What's GOMCOOK?", "Cutshion's cooking robot platform for personalised cooking; it links to ordering and delivery apps and won the RoboWorld Award 2023."),
("Cutshion's drawing robot, how does it work?", "It takes your photo, AI turns it into a line drawing, and the robot arm draws it on a canvas."),
("Does Cutshion make welding robots?", "Yes, a lightweight collaborative welding robot that follows the weld seam; the mobile version won the RoboWorld Award 2024."),
],
"ko": [
("아이스크림 로봇은 하나 만드는 데 얼마나 걸려요?", "한 개에 약 30초 걸리고, 콘을 40개 넣을 수 있어요."),
("캔디볼 로봇 몇 초 걸려?", "캔디볼 하나에 약 20초 걸려요."),
("팔레타이징 로봇은 몇 킬로까지 들 수 있습니까?", "20kg까지 다룰 수 있고, 한 사이클에 약 15초 걸립니다."),
("바리스타 로봇 뭐가 좋아요?", "에스프레소 머신을 직접 써서 원두 분쇄, 도징, 탬핑, 추출까지 해요. 언제나 같은 맛을 내요."),
("메가커피랑 무슨 계약 했어?", "2025년 12월에 메가커피와 바리스타 로봇 연간 공급 계약을 맺었어요."),
("피오노이드가 뭐예요?", "제조사와 상관없이 하나의 로봇 API로 로봇 앱을 만들고 공유하는 쿳션의 로봇 개발 플랫폼이에요."),
("곰쿡이 뭐야?", "쿳션의 조리 로봇 플랫폼이에요. 주문, 배달 앱과 연동되고 로보월드 어워드 2023을 받았어요."),
("쿳션 drawing robot 어떻게 그려요?", "사진을 찍으면 AI가 선 그림으로 바꾸고, 로봇 팔이 그걸 캔버스에 그려 줘요."),
],
},
"unknown": {
"en": [
("What's Cutshion's revenue?", "I don't have exact information about that. Cutshion's website doesn't give its sales."),
("Is Cutshion hiring?", "I don't have exact information about that. You could ask at cutshion@cutshion.com."),
("How many robots has Cutshion sold?", "I don't have exact information about that; the total number sold isn't published."),
("Where's Cutshion's next exhibition?", "I don't have exact information about that. I only know its past shows, like CES 2026 and VivaTech."),
("What are the office hours?", "I don't have exact information about that. Please call 070-8959-2960 to check."),
("Is Cutshion on the stock market?", "I don't have exact information about that."),
],
"ko": [
("쿳션 매출이 얼마야?", "그건 정확한 정보가 없어요. 매출은 홈페이지에 나와 있지 않아요."),
("쿳션 지금 채용해요?", "채용은 제가 정확한 정보가 없어요. cutshion@cutshion.com으로 문의해 보세요."),
("로봇 몇 대 팔았습니까?", "총 판매 대수는 제가 정확한 정보가 없습니다."),
("다음 전시회 어디예요?", "다음 전시회는 잘 몰라요. 지난번에는 CES 2026이나 비바테크에 참가했어요."),
("쿳션 상장했어?", "그건 정확한 정보가 없어요."),
],
},
"achievements": {
"en": [
("Has Cutshion got any investment?", "Yes, a seed investment of 500 million won from CNT Tech and Evergreen Investment Partners in August 2025."),
("What is TIPS for Cutshion?", "Cutshion was selected for the TIPS Global Track program in December 2025."),
],
"ko": [
("쿳션 투자 받았어요?", "네, 2025년 8월에 씨엔티테크와 에버그린투자파트너스에서 시드 투자 5억 원을 받았어요."),
("쿳션 상 받은 거 있어?", "로보월드 어워드 2023과 2024, 2026 비바테크 Tech for Change Award를 받았어요."),
],
},
}
for _cat, _langs in _MORE.items():
for _lang, _pairs in _langs.items():
_BANK[_cat][_lang].extend(_pairs)
EXAMPLES = [(cat, lang, said, reply)
for cat, langs in _BANK.items() for lang, pairs in langs.items() for said, reply in pairs]
+9 -6
View File
@@ -128,16 +128,19 @@ NUMBER_WORDS = {"one": 1, "two": 2, "three": 3, "four": 4, "five": 5, "six": 6,
DAY_AFTER = re.compile(r"\bthe (?:day after|next day|following day)\b(?! tomorrow)|그 ?다음 ?날|다음 ?날|그 ?담 ?날", re.I)
DAY_BEFORE = re.compile(r"\bthe day before\b(?! yesterday)|그 ?전 ?날", re.I)
FIXED_DAY = re.compile(r"\bday after tomorrow\b|\bday before yesterday\b|내일 ?모레|글피|그저께|그제|모레|"
r"\btoday\b|\btonight\b|\bthis (?:morning|afternoon|evening)\b|\bright now\b|\bnow\b|오늘|지금|"
r"\btomorrow\b|내일|\byesterday\b|어제", re.I)
r"(?<![a-z])(?:today|tonight)(?![a-z])|\b(?:this |in the )?(?:morning|afternoon|evening)(?![a-z])|"
r"\bright now\b|\bnow\b|오늘|지금|(?<![a-z])tomorrow(?![a-z])|내일|(?<![a-z])yesterday(?![a-z])|어제|"
r"아침|오전|오후|저녁|(?<![가-힣])밤(?:에는|에|은|엔|이)?(?![가-힣])", re.I) # "tomorrow는?", "저녁에는?": English
# words next to Korean ones have no \b; a part of the day alone is today's
FIXED_OFFSET = {"day after tomorrow": 2, "day before yesterday": -2, "내일모레": 2, "내일 모레": 2, "글피": 3,
"그저께": -2, "그제": -2, "모레": 2, "tomorrow": 1, "내일": 1, "yesterday": -1, "어제": -1}
IN_DAYS = re.compile(r"\bin (\d+|one|two|three|four|five|six|seven) days?\b|(\d+|이틀|사흘|나흘) ?(?:일)? ?(?:후|뒤)", re.I)
WEEKDAY = re.compile(r"\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)s?\b|([월화수목금토일])요일", re.I)
WEEKEND = re.compile(r"\bweekend\b|주말", re.I)
WEEKDAY = re.compile(r"(?<![a-z])(monday|tuesday|wednesday|thursday|friday|saturday|sunday)s?(?![a-z])|([월화수목금토일])요일", re.I)
WEEKEND = re.compile(r"(?<![a-z])weekend(?![a-z])|주말", re.I)
NEXT_WEEK = re.compile(r"\bnext\b|다음 ?주|담 ?주", re.I) # "next Monday", "다음 주 월요일", "next weekend"
WEEK = re.compile(r"\b(?:this|next) week\b|이번 ?주|다음 ?주|담 ?주", re.I)
DAY_PHRASE = re.compile("|".join(r.pattern for r in (DAY_AFTER, DAY_BEFORE, IN_DAYS, WEEKDAY, WEEKEND, WEEK, NEXT_WEEK, FIXED_DAY)) +
DAY_PHRASE = re.compile(r"(?:이번|다음|담|this|next|coming) ?(?:주말|weekend)|" + # before "이번 주", "다음 주"
"|".join(r.pattern for r in (DAY_AFTER, DAY_BEFORE, IN_DAYS, WEEKDAY, WEEKEND, WEEK, NEXT_WEEK, FIXED_DAY)) +
r"|\b(?:this|coming|on)\b", re.I) # all the words that name a day, for lumi's follow-ups
@@ -301,7 +304,7 @@ CURRENCIES = {"USD": ("US dollar", r"dollars?|usd|달러"), "EUR": ("euro", r"eu
"GBP": ("British pound", r"pounds? sterling|british pounds?|gbp|파운드"),
"VND": ("Vietnamese dong", r"vietnamese dong|vnd|동화"), "THB": ("Thai baht", r"baht|thb|바트"),
"KRW": ("Korean won", r"\bwons?\b|krw|원화")}
COINS = {"bitcoin": r"bitcoin|btc|비트코인", "ethereum": r"ethereum|\beth\b|이더리움", "ripple": r"\bxrp\b|ripple|리플",
COINS = {"bitcoin": r"bitcoin|btc|비트 ?코인|빗코인", "ethereum": r"ethereum|\beth\b|이더리움", "ripple": r"\bxrp\b|ripple|리플",
"solana": r"solana|솔라나", "dogecoin": r"doge|도지"}
RATE_WORDS = re.compile(r"exchange|\brates?\b|convert|환율|환전|in (korean )?wons?\b|\bto (krw|wons?|usd|dollars?)\b|"
r"\bkrw\b|원으로|얼마", re.I)