From 01d91d5109df4733a94dab265ba7bfb99742f026 Mon Sep 17 00:00:00 2001 From: Cutshion Date: Mon, 2 Nov 2026 09:22:51 +0900 Subject: [PATCH] Fix know-how questions read as arm orders Co-Authored-By: Claude Opus 5.5 --- assistant/brain.py | 2 +- tests/test_night6_words.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assistant/brain.py b/assistant/brain.py index 7c0ace7..2240d8a 100644 --- a/assistant/brain.py +++ b/assistant/brain.py @@ -1062,7 +1062,7 @@ def not_an_order(text, asked=True): ABOUT_IT.search(t) or LATER_SAID.search(t) or ASIDE_NOW.search(t) or DOUBT.search(t)) -DOUBT = re.compile(r"\b(?:can|could) (?:you|u) (?:even|really)\b|" +DOUBT = re.compile(r"\b(?:can|could) (?:you|u) (?:even|really)\b|[가-힣](?:는|은) ?(?:법|방법)(?:을|은)? ?(?:알아|아세요|알아요|아니|알지|아냐|아십니까|알고 ?있)|" r"\b(?:he|she|they|my (?:son|daughter|kid|kids|friend|wife|husband|mom|dad|boss|brother|sister)) " r"(?:wants?|wanted|would like|likes?|loves?|tried) to (?!have you\b)", re.I) # "can you even turn left?": a doubt; "my son wants to fold your arm": what someone else wants to do, no order diff --git a/tests/test_night6_words.py b/tests/test_night6_words.py index f6497ad..613d94c 100644 --- a/tests/test_night6_words.py +++ b/tests/test_night6_words.py @@ -30,7 +30,7 @@ READS = [ ("앞으로 1미터 전진해 봐", "action:move forward 1"), ("좌회전 해 봐", "action:turn left 90"), ("p3로 움직여 봐", "action:go_to p3"), ("고개를 드세요", "action:look up"), ("빨리 돌아와", "action:come_back"), ("노래 부릅시다", "sing"), ("왼쪽 봐", "action:look left"), ("왼쪽으로 돌아봐", "action:look left"), ("번거로우시겠지만 왼쪽을 돌아보시겠어요?", "action:look left"), - ("left로육십degreesturn해봐", None), ("mind folding your arm?", "action:arm fold"), ("how about singing a song?", "sing"), + ("left로육십degreesturn해봐", None), ("팔 접는 법 알아?", None), ("손 흔드는 방법 아세요?", None), ("mind folding your arm?", "action:arm fold"), ("how about singing a song?", "sing"), ] STOPS = ["동작 멈춰 줄 수 있어?", "거기 서 도", "거기 서 봐라", "루미 씨, 동작 멈춰 주시겠어요?", "거기 서 주세요, 부탁드립니다", "could you stop it?", "would you be so kind as to stop?", "please cut it out", "freeze ok?", "you can stop?",