Files
cat-shark 37b75c2d21 Initial commit: 查词学英语 MVP
- 流式查询(SSE 实时展示生成过程)
- 三维度数据模型:history(查询)/ words(单词档案)/ roots(词根档案)
- 词根拆解与发音拼读训练(词根点击揭晓历史词例)
- 词义/同义例句跨查询累积,同义项自动合并
- 历史与词库分页、多维度搜索
- 模型:Qwen3.6-35B-A3B(硅基流动,可 LLM_MODEL 切换)
2026-08-29 08:44:43 +08:00

35 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 查词学英语(MVP
粘贴英语句子、查询其中单词,AI 生成简单易懂的例句帮助学习。基于硅基流动 DeepSeek 模型。
## 启动
```bash
npm install
npm start # 打开 http://localhost:3000
```
API Key 默认内置在 `llm.js`,可通过环境变量覆盖:
```bash
SILICONFLOW_API_KEY=sk-xxx npm start
```
## 功能
- **查询**:粘贴句子 → 添加要查的单词(最多 5 个)→ 调用 LLM 返回:
- 单词的美式音标 + 点击 🔊 朗读(浏览器 TTS)
- 原句语境释义 + 5 条同义例句
- 其他释义各 5 条例句(例句词汇控制在简单水平,附中文翻译)
- **历史记录**:所有查询自动保存(SQLite,`data/app.db`),可查看、**编辑任意内容**(原句/音标/释义/例句,支持增删例句和释义)、删除。
## 技术
- 后端:Node.js + Express + better-sqlite3
- 前端:原生 HTML/CSS/JS(无构建步骤)
- LLM:硅基流动 默认 `Qwen/Qwen3.6-35B-A3B`(已关闭 thinking),可用 `LLM_MODEL` 环境变量切换
## 数据库结构
详见 [SCHEMA.md](SCHEMA.md)history / words / roots 三张表及合并逻辑)。