feat: 添加 OCR 词汇提取功能

新增 OCR 页面,用户可上传教材词汇表截图,使用 GLM-4.6V 视觉模型
提取单词-释义对并保存到指定文件夹。

- AI 管道: src/lib/bigmodel/ocr/ (orchestrator, types)
- 后端模块: src/modules/ocr/ (action-service-repository 架构)
- 前端页面: src/app/(features)/ocr/ (拖拽上传、folder 选择)
- i18n: 8 种语言翻译支持
This commit is contained in:
2026-03-10 15:21:45 +08:00
parent 683a4104ec
commit 9b78fd5215
18 changed files with 868 additions and 0 deletions

View File

@@ -197,6 +197,35 @@
"favorites": "즐겨찾기",
"settings": "설정"
},
"ocr": {
"title": "OCR 어휘 추출",
"description": "교과서 어휘표 스크린샷을 업로드하여 단어-정의 쌍 추출",
"uploadImage": "이미지 업로드",
"dragDropHint": "이미지를 여기에 끌어다 놓거나 클릭하여 선택",
"supportedFormats": "지원 형식: JPG, PNG, WebP",
"selectFolder": "폴더 선택",
"chooseFolder": "추출된 쌍을 저장할 폴더 선택",
"noFolders": "폴더가 없습니다. 먼저 폴더를 만드세요.",
"languageHints": "언어 힌트 (선택사항)",
"sourceLanguageHint": "소스 언어 (예: 영어)",
"targetLanguageHint": "대상/번역 언어 (예: 중국어)",
"process": "이미지 처리",
"processing": "처리 중...",
"preview": "미리보기",
"extractedPairs": "추출된 쌍",
"word": "단어",
"definition": "정의",
"pairsCount": "{count} 쌍 추출됨",
"savePairs": "폴더에 저장",
"saving": "저장 중...",
"saved": "{folder}에 {count} 쌍 저장 완료",
"saveFailed": "저장 실패",
"noImage": "먼저 이미지를 업로드하세요",
"noFolder": "폴더를 선택하세요",
"processingFailed": "OCR 처리 실패",
"tryAgain": "더 선명한 이미지로 다시 시도하세요",
"detectedLanguages": "감지됨: {source} → {target}"
},
"profile": {
"myProfile": "내 프로필",
"email": "이메일: {email}",