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:
@@ -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 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"\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"\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*(?:게|것|거|일)|"
|
||||||
r"뭐\s*하는\s*로봇|무슨\s*기능|어떤\s*기능|기능\S*\s*(?:뭐|뭔|있|알려)|(?:능력|기능)\S*\s*(?:뭐|뭔|알려|소개)", re.I)
|
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\?|"
|
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)
|
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_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, "
|
"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?",
|
"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. "
|
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. "
|
"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):
|
def asked(text):
|
||||||
"""Do these words ask what Lumi can do? ("what can you do?", "what are your abilities", "넌 무슨 일을 해?")"""
|
"""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=""):
|
def more_asked(text, last=""):
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ from robot import agv
|
|||||||
|
|
||||||
HOW_LONG_CHARGE = re.compile(
|
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"\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"\bhow long\b.*\bfull(?:y)? charg|\bto (?:fully )?charge (?:fully|completely|all the way)\b|"
|
||||||
r"충전 ?시간", re.I)
|
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|"
|
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"\bgo (back )?(to )?(re)?charg|한 ?번 충전(?:으로|하면)|완충(?:으로|하면|되면)|충전하면 ?(?:얼마나|몇)|"
|
||||||
r"충전하러", re.I) # how long it lasts (10 hours), when it goes to charge: the LLM
|
r"충전하러", re.I) # how long it lasts (10 hours), when it goes to charge: the LLM
|
||||||
|
|||||||
@@ -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)
|
EXAMPLES = [(cat, lang, said, reply)
|
||||||
for cat, langs in _BANK.items() for lang, pairs in langs.items() for said, reply in pairs]
|
for cat, langs in _BANK.items() for lang, pairs in langs.items() for said, reply in pairs]
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -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_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)
|
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|내일 ?모레|글피|그저께|그제|모레|"
|
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"(?<![a-z])(?:today|tonight)(?![a-z])|\b(?:this |in the )?(?:morning|afternoon|evening)(?![a-z])|"
|
||||||
r"\btomorrow\b|내일|\byesterday\b|어제", re.I)
|
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,
|
FIXED_OFFSET = {"day after tomorrow": 2, "day before yesterday": -2, "내일모레": 2, "내일 모레": 2, "글피": 3,
|
||||||
"그저께": -2, "그제": -2, "모레": 2, "tomorrow": 1, "내일": 1, "yesterday": -1, "어제": -1}
|
"그저께": -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)
|
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)
|
WEEKDAY = re.compile(r"(?<![a-z])(monday|tuesday|wednesday|thursday|friday|saturday|sunday)s?(?![a-z])|([월화수목금토일])요일", re.I)
|
||||||
WEEKEND = re.compile(r"\bweekend\b|주말", 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"
|
NEXT_WEEK = re.compile(r"\bnext\b|다음 ?주|담 ?주", re.I) # "next Monday", "다음 주 월요일", "next weekend"
|
||||||
WEEK = re.compile(r"\b(?:this|next) week\b|이번 ?주|다음 ?주|담 ?주", re.I)
|
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
|
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|파운드"),
|
"GBP": ("British pound", r"pounds? sterling|british pounds?|gbp|파운드"),
|
||||||
"VND": ("Vietnamese dong", r"vietnamese dong|vnd|동화"), "THB": ("Thai baht", r"baht|thb|바트"),
|
"VND": ("Vietnamese dong", r"vietnamese dong|vnd|동화"), "THB": ("Thai baht", r"baht|thb|바트"),
|
||||||
"KRW": ("Korean won", r"\bwons?\b|krw|원화")}
|
"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|도지"}
|
"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|"
|
RATE_WORDS = re.compile(r"exchange|\brates?\b|convert|환율|환전|in (korean )?wons?\b|\bto (krw|wons?|usd|dollars?)\b|"
|
||||||
r"\bkrw\b|원으로|얼마", re.I)
|
r"\bkrw\b|원으로|얼마", re.I)
|
||||||
|
|||||||
+22
-9
@@ -62,17 +62,22 @@ SING = re.compile(r"\bsing\b|\bsay (?:a |some )?songs?\b|" #
|
|||||||
r"(?:불러|부르|들려|해|틀어|틀|뽑아|부탁|재생|플레이|(?:할|부를)\s*(?:수|줄)\s*(?:있|알))|"
|
r"(?:불러|부르|들려|해|틀어|틀|뽑아|부탁|재생|플레이|(?:할|부를)\s*(?:수|줄)\s*(?:있|알))|"
|
||||||
r"노래\s*(?:좀|하나)?\s*(?:듣고\s*싶|들을래|듣자)|(?:다른|딴|다음)\s*(?:노래|곡)|(?:다른|딴)\s*(?:거|걸|걸로)\s*(?:불러|들려|틀어)|^\W*(?:노래|음악)\s*(?:좀|하나)?\W*$", re.I)
|
r"노래\s*(?:좀|하나)?\s*(?:듣고\s*싶|들을래|듣자)|(?:다른|딴|다음)\s*(?:노래|곡)|(?:다른|딴)\s*(?:거|걸|걸로)\s*(?:불러|들려|틀어)|^\W*(?:노래|음악)\s*(?:좀|하나)?\W*$", re.I)
|
||||||
SING_TITLE = re.compile(r"(불러|들려|틀어) ?(줘|주세요|줄래|봐|볼래)|\b(?:sing|play)\b") # "러브 어택 불러 줘": a title said with it
|
SING_TITLE = re.compile(r"(불러|들려|틀어) ?(줘|주세요|줄래|봐|볼래)|\b(?:sing|play)\b") # "러브 어택 불러 줘": a title said with it
|
||||||
SONG_LIST = re.compile(r"\b(?:what|which) (?:kinds? of |sort of |other )?(?:songs?|music|tunes)\b|\bwhat can you sing\b|"
|
SONG_LIST = re.compile(r"\b(?:what|which) (?:kinds? of |sort of |other )?(?:songs?|music|tunes)\b|\bwhat (?:can|do|would|will) you sing\b|"
|
||||||
r"\bsongs? (?:do |can |could )?you (?:know|sing|have)\b|\b(?:know|have) any (?:other )?songs\b|"
|
r"(?<!sing a )(?<!sing one )(?<!sing me a )(?<!sing us a )\bsongs? (?:do |can |could )?you (?:know|sing|have)\b|\b(?:know|have) any (?:other )?songs\b|"
|
||||||
r"\b(?:list|names?) of (?:your |the )?songs\b|"
|
r"\b(?:list|names?) of (?:your |the )?songs\b|"
|
||||||
r"(?:무슨|어떤|뭔|어느)\s*(?:노래|곡)(?!\s*(?:이든|든|이나|나|라도))|노래\s*(?:는|를|은)?\s*(?:뭐|뭘|몇)|"
|
r"(?:무슨|어떤|뭔|어느)\s*(?:노래|곡)(?!\s*(?:이든|든|이나|나|라도))|노래\s*(?:는|를|은)?\s*(?:뭐|뭘|몇)|"
|
||||||
r"아는\s*노래|부를\s*(?:수\s*있는|줄\s*아는)\s*노래|노래\s*목록", re.I)
|
r"아는\s*노래|부를\s*(?:수\s*있는|줄\s*아는)\s*노래|노래\s*목록", re.I)
|
||||||
NOT_REQUEST = re.compile(r"\b(?:do|did) you (?:really )?(?:like|love|enjoy)\b|"
|
NOT_REQUEST = re.compile(r"\b(?:do|did) you (?:really )?(?:like|love|enjoy)\b|"
|
||||||
r"\bwho sings?\b|\bfavou?rite\b|좋아하는|좋아해|잘\s*(?:해|하|불러)", re.I)
|
r"\bwho sings?\b|\bfavou?rite\b|좋아하는|좋아해|잘\s*(?:해|하|불러)|"
|
||||||
|
r"^\W*(?:is|are|was|were|does|did|has|have)\b|\b(?:can|do|could) robots? (?:really |even )?sing\b|"
|
||||||
|
r"(?:노래|음악)\s*(?:하는|부르는)\s*로봇", re.I) # "is Love Attack a new song?", "노래 부르는 로봇 신기하다"
|
||||||
NOT_ASKED = re.compile(r"\b(?:don'?t|do not|never)\s+(?:\w+\s+)?(?:sing|play)\b|\b(?:i|we)(?:'ll| will|'m going to)? sing\b|"
|
NOT_ASKED = re.compile(r"\b(?:don'?t|do not|never)\s+(?:\w+\s+)?(?:sing|play)\b|\b(?:i|we)(?:'ll| will|'m going to)? sing\b|"
|
||||||
r"\b(?:i|we) (?:can'?t|cannot|can|could|used to) sing\b|\b(?:can|may|could|should) (?:i|we) sing\b|"
|
r"\b(?:i|we) (?:can'?t|cannot|can|could|used to) sing\b|\b(?:can|may|could|should) (?:i|we) sing\b|"
|
||||||
r"\b(?:later|tomorrow|tonight|next time|after (?:lunch|dinner|the|this|that|we|i)|"
|
r"\b(?:later|tomorrow|tonight|next time|after (?:lunch|dinner|the|this|that|we|i)|"
|
||||||
r"when (?:the|they|i|we|guests?|everyone|people)|at the end)\b|"
|
r"when (?:the|they|i|we|guests?|everyone|people)|at the end)\b|"
|
||||||
|
r"\bif (?:the|they|i|we|you|he|she|guests?|kids?|someone|people|it)\b|"
|
||||||
|
r"\b(?:never ?mind|forget it|cancel that|actually,? no|on second thought)\b|아니다\s*(?:됐|그만|말자)|됐(?:어|다|습니다)\W*$|"
|
||||||
|
r"(?:끝나|오|되|돌아오|도착하|시작하)면\s|(?:부르는|하는|불렀던|부른) ?거 ?(?:봤|들었)|"
|
||||||
r"(?:부르|하|틀|불르)지\s*(?:마|말)|노래방|나중에|이따가?|있다가|끝나고|면\s*그때|(?:내가|제가)\s*(?:노래\s*)?"
|
r"(?:부르|하|틀|불르)지\s*(?:마|말)|노래방|나중에|이따가?|있다가|끝나고|면\s*그때|(?:내가|제가)\s*(?:노래\s*)?"
|
||||||
r"(?:불러|부를|부르|할)|"
|
r"(?:불러|부를|부르|할)|"
|
||||||
r"^\W*(?:\w+\W+){0,3}?(?:why|how come|how (?:do|does|did|can|could) you)\b|왜|어째서|어떻게", re.I)
|
r"^\W*(?:\w+\W+){0,3}?(?:why|how come|how (?:do|does|did|can|could) you)\b|왜|어째서|어떻게", re.I)
|
||||||
@@ -106,7 +111,9 @@ FILLER = {"sing", "a", "an", "the", "song", "songs", "me", "us", "for", "please"
|
|||||||
"awesome", "lovely", "sweet", "funny", "silly", "piece", "tell", "show", "make", "is", "are", "be", "i", "we",
|
"awesome", "lovely", "sweet", "funny", "silly", "piece", "tell", "show", "make", "is", "are", "be", "i", "we",
|
||||||
"sung", "lumie", "random", "pick", "choose", "and", "like", "say", "wish", "how", "about", "have", "time",
|
"sung", "lumie", "random", "pick", "choose", "and", "like", "say", "wish", "how", "about", "have", "time",
|
||||||
"cheer", "up", "sin", "sink", "sum", "here", "kids", "listen", "listening", "would", "mind", "surprise",
|
"cheer", "up", "sin", "sink", "sum", "here", "kids", "listen", "listening", "would", "mind", "surprise",
|
||||||
"change", "switch"}
|
"change", "switch", "son", "sonf", "sogn", "snog", "sonng", "songg", "bro", "dude", "buddy", "robot", "grandma",
|
||||||
|
"grandpa", "granny", "mom", "mum", "dad", "she", "he", "him", "her", "likes", "loves", "daughter", "sister",
|
||||||
|
"brother", "friend", "wife", "husband", "kid", "guest", "guests", "na", "bestie", "dear"} # slips of "song", the people sung to
|
||||||
UNKNOWN = {"en": ["Sorry, I can't sing that one. I only know my own songs: {}. Want one of them?",
|
UNKNOWN = {"en": ["Sorry, I can't sing that one. I only know my own songs: {}. Want one of them?",
|
||||||
"I don't know that song yet. I'd love to learn it someday! I can sing {}. Shall I sing one?",
|
"I don't know that song yet. I'd love to learn it someday! I can sing {}. Shall I sing one?",
|
||||||
"That one isn't in my songbook, sorry. My songs are {}. Would you like one of those?",
|
"That one isn't in my songbook, sorry. My songs are {}. Would you like one of those?",
|
||||||
@@ -237,7 +244,7 @@ def _title(text, all_songs):
|
|||||||
def _without_ours(text, all_songs):
|
def _without_ours(text, all_songs):
|
||||||
low = (text or "").lower()
|
low = (text or "").lower()
|
||||||
for n in sorted((n for s in all_songs.values() for n in s["names"]), key=len, reverse=True):
|
for n in sorted((n for s in all_songs.values() for n in s["names"]), key=len, reverse=True):
|
||||||
low = re.sub(_name_re(n), " ", low)
|
low = re.sub(_name_re(n), " , ", low) # a comma: the words said before our title are not a title
|
||||||
return low
|
return low
|
||||||
|
|
||||||
|
|
||||||
@@ -246,7 +253,8 @@ def _without_ours(text, all_songs):
|
|||||||
EN_SLOTS = [re.compile(r"\b(?:sing|play|perform|put on)\s+(.+?)\s*(?:\b(?:songs?|tunes?|music|for|please|now|again|lumi|to|with|"
|
EN_SLOTS = [re.compile(r"\b(?:sing|play|perform|put on)\s+(.+?)\s*(?:\b(?:songs?|tunes?|music|for|please|now|again|lumi|to|with|"
|
||||||
r"together|today|right|ok|okay)\b|[,.!?~]|$)"),
|
r"together|today|right|ok|okay)\b|[,.!?~]|$)"),
|
||||||
re.compile(r"((?:[\w'-]+\s+){0,2}[\w'-]+?)(?:'s)?\s+(?:songs?|tunes?|music)\b"),
|
re.compile(r"((?:[\w'-]+\s+){0,2}[\w'-]+?)(?:'s)?\s+(?:songs?|tunes?|music)\b"),
|
||||||
re.compile(r"\b(?:songs?|something|anything|one|tunes?|music)\s+(?:by|from|of|about)\s+(.+?)\s*(?:[,.!?]|\bplease\b|$)")]
|
re.compile(r"\b(?:songs?|something|anything|one|tunes?|music)\s+(?:by|from|of|about)\s+(.+?)\s*(?:[,.!?]|\bplease\b|$)"),
|
||||||
|
re.compile(r"\b(?:you know|do you know|know)\s+(.+?)\s*\?\s*(?:then |so |just |please |now )?(?:sing|play) (?:it|that|this)\b")]
|
||||||
KO_SLOTS = [re.compile(r"((?:\S+\s+){0,2}\S+?)\s*(?:의\s*)?(?:노래|곡|음악|송)"),
|
KO_SLOTS = [re.compile(r"((?:\S+\s+){0,2}\S+?)\s*(?:의\s*)?(?:노래|곡|음악|송)"),
|
||||||
re.compile(r"((?:\S+\s+){0,2}\S+?)\s*(?:을|를)?\s*(?:좀\s*)?(?:불러|들려|틀어|부르)")]
|
re.compile(r"((?:\S+\s+){0,2}\S+?)\s*(?:을|를)?\s*(?:좀\s*)?(?:불러|들려|틀어|부르)")]
|
||||||
FILLER_KO = {"루미야", "루미", "루미씨", "좀", "하나", "하나만", "한", "곡", "한곡", "노래", "음악", "아무", "아무거나", "다른", "딴",
|
FILLER_KO = {"루미야", "루미", "루미씨", "좀", "하나", "하나만", "한", "곡", "한곡", "노래", "음악", "아무", "아무거나", "다른", "딴",
|
||||||
@@ -254,7 +262,11 @@ FILLER_KO = {"루미야", "루미", "루미씨", "좀", "하나", "하나만", "
|
|||||||
"내", "그", "이", "저기", "한국", "한국어", "영어", "외국", "무슨", "어떤", "아는", "지금", "빨리", "한번", "번", "같이",
|
"내", "그", "이", "저기", "한국", "한국어", "영어", "외국", "무슨", "어떤", "아는", "지금", "빨리", "한번", "번", "같이",
|
||||||
"다시", "또", "진짜", "그냥", "케이팝", "제일", "가장", "최신", "음", "어", "자", "그럼", "혹시", "먼저", "거", "걸",
|
"다시", "또", "진짜", "그냥", "케이팝", "제일", "가장", "최신", "음", "어", "자", "그럼", "혹시", "먼저", "거", "걸",
|
||||||
"것", "뭐", "뭔가", "아무노래", "노래나", "곡만", "더", "요", "예", "응", "네네", "어서", "얼른", "한곡만", "하나쯤",
|
"것", "뭐", "뭔가", "아무노래", "노래나", "곡만", "더", "요", "예", "응", "네네", "어서", "얼른", "한곡만", "하나쯤",
|
||||||
"신곡", "의", "뭐든", "아무거나요", "노레", "노랠", "야", "래", "노", "신나게", "재밌게", "멋지게", "크게", "작게", "잠깐", "이번엔", "이번에는", "오늘", "여기서", "다들", "모두"}
|
"신곡", "의", "뭐든", "아무거나요", "노레", "노랠", "야", "래", "노", "신나게", "재밌게", "멋지게", "크게", "작게", "잠깐", "이번엔", "이번에는", "오늘", "여기서", "다들", "모두",
|
||||||
|
"로봇", "로봇아", "말고", "그거", "이거", "얘", "애들", "할머니", "할아버지", "엄마", "아빠", "손님", "손님들",
|
||||||
|
"씨", "짱", "님", "오빠", "언니", "누나", "형", "선배", "선배님", "양반", "형제님", "친구", "기사님", "선생님",
|
||||||
|
"로봇님", "루미아", "저기요", "이봐", "이보게", "어이", "대박", "그래", "곡뽑아", "부를", "줄", "알면", "할줄",
|
||||||
|
"부를줄"} # addresses and the words of "부를 줄 알면 한 곡 해 봐"
|
||||||
VERB_KO = re.compile(r"^(?:불러|부르|불러줘|들려|틀어|틀|켜|해|줘|주|봐|부탁|시작|제발|할|하자|합시다|뽑아|바꿔|바꾸)") # the request's own words
|
VERB_KO = re.compile(r"^(?:불러|부르|불러줘|들려|틀어|틀|켜|해|줘|주|봐|부탁|시작|제발|할|하자|합시다|뽑아|바꿔|바꾸)") # the request's own words
|
||||||
_PARTICLE = re.compile(r"(?<=.)(?:을|를|은|는|이|가|도|만|요|나|이나|라도|이라도|으로|로)$")
|
_PARTICLE = re.compile(r"(?<=.)(?:을|를|은|는|이|가|도|만|요|나|이나|라도|이라도|으로|로)$")
|
||||||
_ADNOMINAL = tuple("는은운한픈른쁜던된난진") # "신나는", "조용한", "슬픈": a kind of song, no title
|
_ADNOMINAL = tuple("는은운한픈른쁜던된난진") # "신나는", "조용한", "슬픈": a kind of song, no title
|
||||||
@@ -266,9 +278,10 @@ def _other_song(text, all_songs, whole=False):
|
|||||||
"좋으니까") or one said to someone ("아이한테") ends the title part."""
|
"좋으니까") or one said to someone ("아이한테") ends the title part."""
|
||||||
low = _without_ours(text, all_songs)
|
low = _without_ours(text, all_songs)
|
||||||
whole_text = [re.match(r"(.*)", low, re.S)] if whole else [] # read by the bank: every word may hold a title
|
whole_text = [re.match(r"(.*)", low, re.S)] if whole else [] # read by the bank: every word may hold a title
|
||||||
for slots, word in ((EN_SLOTS, r"[a-z][a-z'-]*"), (KO_SLOTS, r"[a-z][a-z'-]*|[가-힣]+")):
|
for slots, word in ((EN_SLOTS, r"[a-z][a-z'-]*|[가-힣]+"), (KO_SLOTS, r"[a-z][a-z'-]*|[가-힣]+")):
|
||||||
for m in whole_text + [m for slot in slots for m in slot.finditer(low)]:
|
for m in whole_text + [m for slot in slots for m in slot.finditer(low)]:
|
||||||
for w in reversed(re.findall(word, m.group(1))):
|
part = re.split(r"[,.!?~]", m.group(1))[-1] # "루미 씨, 러브 어택 불러 줘": the address is no title
|
||||||
|
for w in reversed(re.findall(word, part)):
|
||||||
if re.match(r"[a-z]", w):
|
if re.match(r"[a-z]", w):
|
||||||
if w.strip("'-").removesuffix("'s") not in FILLER:
|
if w.strip("'-").removesuffix("'s") not in FILLER:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# JAKA Robotics
|
||||||
|
|
||||||
|
## JAKA in short
|
||||||
|
|
||||||
|
What is JAKA? JAKA Robotics (JAKA, also written Jaka or Jacka; in Korean 자카 or 작카; Chinese name 节卡) is a Chinese robot company that makes collaborative robot arms (cobots) and embodied AI robots such as humanoids. It was founded in 2014 by a group of engineers and robotics researchers. Its research and development centre is in Shanghai and its automated factory is in Changzhou, China. JAKA is a different company from Cutshion; Lumi was developed by Cutshion Company. 자카(JAKA)는 협동로봇과 휴머노이드 같은 체화 지능 로봇을 만드는 중국 로봇 회사예요. 2014년에 설립됐고, 연구개발 센터는 상하이, 생산 기지는 창저우에 있어요.
|
||||||
|
|
||||||
|
## The name JAKA
|
||||||
|
|
||||||
|
What does JAKA mean? The English name JAKA stands for "Just Always Keep Amazing". The Chinese name 节卡 means "victory step by step, always searching higher and lower". 자카라는 이름은 "Just Always Keep Amazing"의 약자예요.
|
||||||
|
|
||||||
|
## Size, market share and customers
|
||||||
|
|
||||||
|
How big is JAKA? In 2024 JAKA's collaborative robots had a 21.9 % share of the Chinese market, the largest, number one in China (third-party statistics). About 30,000 JAKA robots (tens of thousands) work in nearly 100 countries and regions. Customers include Toyota, Schneider, CRRC, Luxshare, Xingyu, Dongshan Precision and SAIC Motor. JAKA has nearly 300 patents and CR, CE and cSGSus certifications. 2024년 자카 협동로봇의 중국 시장 점유율은 21.9%로 1위예요. 전 세계 약 100개 나라에 약 3만 대가 설치돼 있어요.
|
||||||
|
|
||||||
|
JAKA's offices: nine branches in Shanghai, Changzhou, Shenzhen, Hong Kong, Japan, Germany, the USA, Malaysia and Singapore. Awards: a national "Little Giant" specialised enterprise, national intellectual property advantage enterprise, the Shanghai Science and Technology Progress first prize, China International Industry Fair (CIIF) awards and Japan's Good Design Award. JAKA was the first maker in China certified for Siemens SRCI. More than 30 % of its staff work in research. Its robots helped maintain China's FAST radio telescope and took part in Mars exploration projects. JAKA's mission: "liberate productivity, create a better world".
|
||||||
|
|
||||||
|
## JAKA products
|
||||||
|
|
||||||
|
What does JAKA make? JAKA's product family has collaborative robot arms (cobots) and embodied AI robots (humanoids). Cobot series: JAKA Zu (high performance, repeatability ±0.02 mm, used in car factories), JAKA Pro (IP68, the highest protection, works in oil, dust, water, -10 to 55 °C), JAKA S (a six-axis force / torque sensor built into the end, IP65), JAKA A (standard, 20 % faster joints, IP67 wrist, A12 reach 1425 mm), JAKA C (payloads 5, 7 and 12 kg, repeatability ±0.05 mm), JAKA Mini (light, the arm weighs 8.7 kg, the Minicab controller only 1.1 kg), JAKA MAX (industrial cobot, 40 kg payload, CIIF award 2024), JAKA All-in-one (small, simple, smart, with the JAKA Lens 2D camera), and the 节卡小助 series (payloads 3 to 30 kg, Zu20 and Zu30, the 20 kg model reaches 1780 mm). Its software: Coboπ, a web-based graphical teaching program; JAKA invented wireless teaching and graphical (block) programming for robots. 자카는 협동로봇(Zu, Pro, S, A, C, Mini, MAX, All-in-one 시리즈)과 휴머노이드 같은 체화 지능 로봇을 만들어요.
|
||||||
|
|
||||||
|
## JAKA humanoids and embodied AI
|
||||||
|
|
||||||
|
Does JAKA make humanoid robots? Yes, the JAKA embodied AI family: JAKA K1, a dual-arm humanoid robot and JAKA's first embodied AI product (5 kg payload, ±0.05 mm, force sensors in the arm ends); JAKA K1W, a wheeled humanoid with 21 degrees of freedom, three cameras, two arms with force control, a 360° lidar and an omnidirectional base, working in factories for sorting, carrying and loading; JAKA K1L, a legged humanoid, 1.8 m tall with 29 joints (without hands), two 7-joint arms with 14 degrees of freedom, ±0.1 mm repeatability and more than 3 kg per arm; also JAKA Kargo, a wheeled humanoid, and JAKA EVO, an industrial embodied AI platform. 자카의 휴머노이드: 양팔 휴머노이드 K1, 바퀴형 휴머노이드 K1W(자유도 21), 다리형 휴머노이드 K1L(키 1.8m, 관절 29개)이 있어요.
|
||||||
|
|
||||||
|
## Not known about JAKA
|
||||||
|
|
||||||
|
JAKA's prices, its number of employees, its revenue and who founded it by name are not in these notes. 자카의 가격, 직원 수, 매출은 알지 못해요.
|
||||||
+6
-2
@@ -15,6 +15,7 @@ missed (no song where one was asked); odd (no song, but the wrong kind of answer
|
|||||||
import collections
|
import collections
|
||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -31,7 +32,9 @@ TITLES = [n for s in sing.songs().values() for n in (s["title"].lower(), s["titl
|
|||||||
|
|
||||||
|
|
||||||
def sung(text, lang, before, whole=False):
|
def sung(text, lang, before, whole=False):
|
||||||
song = sing.choose(text, lang, SANG_SONG if before == SANG else None, whole)
|
sang = re.match(r"ACTION: sing (\w+)", before[1]) if before else None # lumi.last_song: the song sung just before
|
||||||
|
song = sing.picked(text, before[1] if before else "") or \
|
||||||
|
sing.choose(text, lang, sang.group(1) if sang else None, whole) # as lumi.sing_now: after the list, its order
|
||||||
return "unknown" if song is None else "sing:" + song
|
return "unknown" if song is None else "sing:" + song
|
||||||
|
|
||||||
|
|
||||||
@@ -69,9 +72,10 @@ def from_llm(raw, first, text, lang, before, marks):
|
|||||||
|
|
||||||
def verdict(expect, got, before):
|
def verdict(expect, got, before):
|
||||||
kind = got.split(":")[0]
|
kind = got.split(":")[0]
|
||||||
|
sang = re.match(r"ACTION: sing (\w+)", before[1]) if before else None
|
||||||
for alt in expect.split(" | "):
|
for alt in expect.split(" | "):
|
||||||
if alt == got or alt == "sing" and kind == "sing" or \
|
if alt == got or alt == "sing" and kind == "sing" or \
|
||||||
alt == "sing_other" and kind == "sing" and got != "sing:" + SANG_SONG or \
|
alt == "sing_other" and kind == "sing" and got != "sing:" + (sang.group(1) if sang else SANG_SONG) or \
|
||||||
alt == "list" and got in ("list", "talk_titles") or \
|
alt == "list" and got in ("list", "talk_titles") or \
|
||||||
alt == "unknown" and got in ("talk", "talk_titles") or \
|
alt == "unknown" and got in ("talk", "talk_titles") or \
|
||||||
alt in ("no", "stop") and got in ("talk", "talk_titles", "stop", "list"):
|
alt in ("no", "stop") and got in ("talk", "talk_titles", "stop", "list"):
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ NOW = ["And charging?", "charging?", "battery?", "Battery", "what's your battery
|
|||||||
"배터리 몇 프로야?", "충전 중이야?", "배터리 얼마나 남았어?", "배터리 상태 어때?", "지금 충전하고 있어?", "배터리는?",
|
"배터리 몇 프로야?", "충전 중이야?", "배터리 얼마나 남았어?", "배터리 상태 어때?", "지금 충전하고 있어?", "배터리는?",
|
||||||
"배터리 충분해?", "충전 중이에요?", "그럼 충전은?", "충전은요?", "배터리 몇 퍼센트예요?"]
|
"배터리 충분해?", "충전 중이에요?", "그럼 충전은?", "충전은요?", "배터리 몇 퍼센트예요?"]
|
||||||
HOW_LONG = ["how long does charging take?", "How long does it take to charge?", "how long to recharge",
|
HOW_LONG = ["how long does charging take?", "How long does it take to charge?", "how long to recharge",
|
||||||
"what's the charging time", "충전 시간 얼마나 걸려?", "충전하는 데 얼마나 걸려요?", "충전 몇 시간 걸려?"]
|
"what's the charging time", "충전 시간 얼마나 걸려?", "충전하는 데 얼마나 걸려요?", "충전 몇 시간 걸려?",
|
||||||
|
"완충하는 데 얼마나 걸려?", "완충까지 몇 시간이에요?", "how long does a full charge take?", "완충 시간이 얼마예요?"]
|
||||||
OTHER = ["How long does your battery last?", "how long on a charge?", "How long does the battery last on a full charge?",
|
OTHER = ["How long does your battery last?", "how long on a charge?", "How long does the battery last on a full charge?",
|
||||||
"what kind of battery do you have", "배터리 얼마나 가요?", "한 번 충전하면 몇 시간 가요?", "배터리 용량이 얼마야?",
|
"what kind of battery do you have", "배터리 얼마나 가요?", "한 번 충전하면 몇 시간 가요?", "배터리 용량이 얼마야?",
|
||||||
"go charge", "충전하러 가", "How long until you need a charge?", "at what battery level do you go back to charge",
|
"go charge", "충전하러 가", "How long until you need a charge?", "at what battery level do you go back to charge",
|
||||||
|
|||||||
+5
-1
@@ -113,7 +113,8 @@ fri = datetime.date(2026, 10, 23)
|
|||||||
for q, days in {"오늘 날씨": [0], "and tomorrow?": [1], "모레는요?": [2], "내일모레": [2], "next Monday?": [3],
|
for q, days in {"오늘 날씨": [0], "and tomorrow?": [1], "모레는요?": [2], "내일모레": [2], "next Monday?": [3],
|
||||||
"다음 주 월요일 어때요?": [3], "this weekend": [1, 2], "이번 주말": [1, 2], "and Friday?": [0],
|
"다음 주 월요일 어때요?": [3], "this weekend": [1, 2], "이번 주말": [1, 2], "and Friday?": [0],
|
||||||
"next Friday": [7], "yesterday": [-1], "어제": [-1], "in 2 days": [2], "사흘 뒤": [3], "what about Busan?": None,
|
"next Friday": [7], "yesterday": [-1], "어제": [-1], "in 2 days": [2], "사흘 뒤": [3], "what about Busan?": None,
|
||||||
"the day after": [2]}.items():
|
"the day after": [2], "tomorrow는?": [1], "weekend는?": [1, 2], "다음 주말은?": [8, 9], "저녁에는?": [0],
|
||||||
|
"in the evening?": [0], "밤에는?": [0]}.items():
|
||||||
assert web.asked_day(q, [1], fri) == days, (q, web.asked_day(q, [1], fri))
|
assert web.asked_day(q, [1], fri) == days, (q, web.asked_day(q, [1], fri))
|
||||||
week = "Weather in Seoul now: clear sky, 15 degrees.\n" + "\n".join(
|
week = "Weather in Seoul now: clear sky, 15 degrees.\n" + "\n".join(
|
||||||
f"{(fri + datetime.timedelta(days=i)).strftime('%A %d %B')}: rain." for i in range(7))
|
f"{(fri + datetime.timedelta(days=i)).strftime('%A %d %B')}: rain." for i in range(7))
|
||||||
@@ -229,4 +230,7 @@ assert events[1][1] == "내일 비 와? (the weather)", events
|
|||||||
web.search, events[:] = (lambda target: None), []
|
web.search, events[:] = (lambda target: None), []
|
||||||
L.look_up("Who won?", "search", "winner")
|
L.look_up("Who won?", "search", "winner")
|
||||||
assert [e[1] for e in events][1].startswith("Sorry, I'm not connected"), events
|
assert [e[1] for e in events][1].startswith("Sorry, I'm not connected"), events
|
||||||
|
# the weather follow-up after a weather question: the day or the place moves
|
||||||
|
for q, place in {"이번 주말은 어때요?": "", "tomorrow는?": "", "부산은?": None, "and Tokyo tomorrow?": "Tokyo"}.items():
|
||||||
|
assert brain.weather_follow(q) == place, (q, brain.weather_follow(q))
|
||||||
print("web ok")
|
print("web ok")
|
||||||
|
|||||||
Reference in New Issue
Block a user