Files
john 05e173b293 Ship native iOS app, Wiki/TTS backend, and skeleton loading UX.
Replace the WebView shell with SwiftUI screens, add account-scoped Wiki and TTS APIs with adaptive review and photo scan support, and keep web/iOS pages usable while data loads asynchronously.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 15:13:59 +08:00

11 lines
369 B
Python

import re
def normalize_en_answer(text: str) -> str:
"""英文拼写/短语答案:去首尾空白、小写、连续空白压成单个空格。"""
return re.sub(r"\s+", " ", (text or "").strip().lower())
def en_answers_match(user_answer: str, correct_answer: str) -> bool:
return normalize_en_answer(user_answer) == normalize_en_answer(correct_answer)