Improve wake and greeting behaviour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 17:50:58 +09:00
co-authored by Claude Opus 5.5
parent 365e3b3cec
commit 7be952f5ca
5 changed files with 347 additions and 70 deletions
+6 -2
View File
@@ -150,9 +150,13 @@ def lang_of(text):
return "ko" if re.search(r"[가-힣]", text) else "en"
FOREIGN = re.compile(r"[Ѐ-ӿ぀-ヿ㐀-䶿一-鿿豈-﫿]+") # Cyrillic, kana,
# Chinese: Lumi speaks only English and Korean, such text from the LLM is dropped, never read out
def sentences(text):
parts = re.split(r"(?<=[.!?。!?])\s+", text.strip())
return [p for p in parts if p]
parts = re.split(r"(?<=[.!?。!?])\s+", FOREIGN.sub("", text).strip())
return [p for p in parts if re.search(r"\w", p)]
def first_parts(sentence):