diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d3e984..3ac32bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## Unreleased +## 0.4.9 - 2026-11-13 + +- 新增术语名词表 `src/texada/core/glossary.py`(24 条,含格林/高斯/斯托克斯/贝叶斯/全概率/华里士/施密特/拉格朗日/罗尔/柯西/泰勒/洛必达/一阶线性 ODE/二阶常系数/中心极限/样本方差/欧拉/夹逼/路径无关/二项分布/分部积分/N-L/柯西不等式/秩不等式),每条带名称别名、LaTeX、出处与备注。 +- 词表沿既有确定性快路径接入:`DeterministicCandidateEngine._canonical_concept` 兜底查表(规则名仍为 `nl_canonical_concept`),`/api/convert` 在同一处先查表,命中返回 `Source.TEMPLATE`、`tokens_used=0`。匹配要求规范化后与别名完全相等,带参数的句子与复合问句仍交给模型;每条 LaTeX 必须通过 KaTeX 校验,失败则回退模型路径。 +- 实测(MiniCPM-V 4.7 1B):真实语料 31/52 → **47/52**,其中 `named-formula` 5/20 → **20/20**;52 条里 21 条零 token 直出,词表命中 p50 ≈ 12 ms,模型路径 ≈ 0.8 s。100 条 golden set 仍为 59/95,未借词表刷分。 +- 评测 runner 现在区分「确定性直出」与「模型结果」并单列条目,避免把查表得分读成模型能力;README 中英双段与 `docs/architecture.md`、`eval/known-gaps.md`(G-017)同步。 +- Serve bare theorem names from a curated glossary (24 entries) on the existing deterministic-candidate path, so the small model is no longer asked to recall textbook formulas. + ## 0.4.8 - 2026-11-13 - 修复计算范围门禁的误拒:`u 除以 v 的求导法则`、`泰勒公式的求导法则`、`基本积分公式表` 这类"要排版的内容"此前因动词 `求导` 命中而被整句拒绝。现在动词扫描前先剥离 `求导/积分/极限 +(的)法则|公式|规则|表` 固定搭配,`计算这个求导公式`、`推导…的求导法则` 仍按计算请求拒绝。 diff --git a/docs/release-v0.4.9.md b/docs/release-v0.4.9.md new file mode 100644 index 0000000..20d4f54 --- /dev/null +++ b/docs/release-v0.4.9.md @@ -0,0 +1,30 @@ +# TeXada v0.4.9 + +发布日期 / Release date 2026-11-13(Asia/Shanghai)。 + +v0.4.9 解决"只报定理名就答不出/答错"这一档:术语名改用受控词表直出, +把 1B 模型从"回忆教科书公式"里解放出来。 + +[下载 Release](https://github.com/CacinieP/TeXada-the-Math-Agent/releases/tag/v0.4.9) · [完整 diff](https://github.com/CacinieP/TeXada-the-Math-Agent/compare/v0.4.8...v0.4.9) · [CHANGELOG](../CHANGELOG.md#049---2026-11-13) · [使用指南](../README.md) + +## 本版变化 + +- 新增受控词表 `src/texada/core/glossary.py`:24 个术语(格林、高斯、斯托克斯、 + 贝叶斯、全概率、华里士、施密特正交化、拉格朗日/罗尔/柯西中值、泰勒、洛必达、 + 一阶线性与二阶常系数通解、中心极限、样本方差、欧拉、夹逼、路径无关、 + 二项分布、分部积分、牛顿-莱布尼茨、柯西不等式、乘积秩不等式), + 每条都带别名、出处与备注。 +- 复用既有确定性快路径(`nl_canonical_concept`),不新增分支:命中即零 token、 + 约 12 ms 返回,`/api/convert` 同样先查表。**只有输入就是术语名时才命中**, + `格林公式和斯托克斯公式的区别`、`泰勒展开式`、带参数的句子仍走模型。 +- 每条 LaTeX 必须通过 KaTeX 校验;校验失败自动回退模型路径,绝不返回坏公式。 +- 实测(MiniCPM-V 4.7 1B):真实语料 **31/52 → 47/52**,其中术语名一档 + **5/20 → 20/20**;52 条里 21 条零 token 直出。100 条 golden set 仍为 59/95。 +- 评测 runner 现区分"确定性直出"与"模型结果"并单列,避免把查表得分当模型能力。 + +## 边界 + +- 词表只覆盖"输入即术语名"(见 `eval/known-gaps.md` G-017);带参数、复合句、 + 含上下文的请求仍在模型路径。 +- 词表是受控数据,不抓取、不推断;扩表必须补出处并通过 KaTeX 校验。 +- 未改模型、提示词、打包、签名与公证流程。 diff --git a/package-lock.json b/package-lock.json index f39cf4e..e5cbdfa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "texada-the-math-agent", - "version": "0.4.8", + "version": "0.4.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "texada-the-math-agent", - "version": "0.4.8", + "version": "0.4.9", "license": "AGPL-3.0-or-later", "devDependencies": { "katex": "0.18.2" diff --git a/package.json b/package.json index 81e82b1..54d5e52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "texada-the-math-agent", - "version": "0.4.8", + "version": "0.4.9", "description": "Local formula recognition, transcription and typesetting powered by MiniCPM", "repository": { "type": "git", diff --git a/pyproject.toml b/pyproject.toml index 136e79c..203d839 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "texada" -version = "0.4.8" +version = "0.4.9" description = "Local formula recognition, transcription and typesetting powered by MiniCPM" license = "AGPL-3.0-or-later" requires-python = ">=3.12" diff --git a/src/texada/__init__.py b/src/texada/__init__.py index aabbdc5..e2300e7 100644 --- a/src/texada/__init__.py +++ b/src/texada/__init__.py @@ -4,4 +4,4 @@ try: __version__ = version("texada") except PackageNotFoundError: - __version__ = "0.4.8" + __version__ = "0.4.9" diff --git a/src/texada/api.py b/src/texada/api.py index 635e0f1..b9d6a44 100644 --- a/src/texada/api.py +++ b/src/texada/api.py @@ -357,7 +357,7 @@ def _app_version() -> str: try: return version("texada") except PackageNotFoundError: - return "0.4.8" + return "0.4.9" def _settings_response(config: TeXadaConfig) -> BackendSettingsResponse: diff --git a/tauri-shell/src-tauri/Cargo.lock b/tauri-shell/src-tauri/Cargo.lock index 43e1ca9..8eec811 100644 --- a/tauri-shell/src-tauri/Cargo.lock +++ b/tauri-shell/src-tauri/Cargo.lock @@ -3913,7 +3913,7 @@ dependencies = [ [[package]] name = "texada-shell" -version = "0.4.8" +version = "0.4.9" dependencies = [ "objc2-app-kit", "objc2-quartz-core", diff --git a/tauri-shell/src-tauri/Cargo.toml b/tauri-shell/src-tauri/Cargo.toml index e3652c0..ece3756 100644 --- a/tauri-shell/src-tauri/Cargo.toml +++ b/tauri-shell/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "texada-shell" -version = "0.4.8" +version = "0.4.9" description = "TeXada — formula recognition, transcription and typesetting" authors = ["TeXada"] license = "AGPL-3.0-or-later" diff --git a/tauri-shell/src-tauri/tauri.conf.json b/tauri-shell/src-tauri/tauri.conf.json index 460571c..40ae3d6 100644 --- a/tauri-shell/src-tauri/tauri.conf.json +++ b/tauri-shell/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "TeXada", - "version": "0.4.8", + "version": "0.4.9", "identifier": "com.texada.desktop", "build": { "frontendDist": "../src", diff --git a/tauri-shell/src/index.html b/tauri-shell/src/index.html index ebe31bb..07a3638 100644 --- a/tauri-shell/src/index.html +++ b/tauri-shell/src/index.html @@ -6,7 +6,7 @@ TeXada - +
@@ -506,7 +506,7 @@

历史公式
关于
TeXada Shell
-
v0.4.8
+
v0.4.9

@@ -515,6 +515,6 @@

历史公式 - + diff --git a/tests/test_config.py b/tests/test_config.py index dc64b20..aa843ac 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -62,7 +62,7 @@ def test_release_version_is_synchronized_across_python_node_and_tauri(): __version__, _app_version(), } - } == {Version("0.4.8")} + } == {Version("0.4.9")} assert f"v{python_version}" in frontend @@ -72,7 +72,7 @@ def missing_distribution(_: str) -> str: monkeypatch.setattr(api_module, "version", missing_distribution) - assert _app_version() == "0.4.8" + assert _app_version() == "0.4.9" def test_license_is_synchronized_as_agpl_v3_or_later(): diff --git a/uv.lock b/uv.lock index 3ba154e..ce474c1 100644 --- a/uv.lock +++ b/uv.lock @@ -960,7 +960,7 @@ wheels = [ [[package]] name = "texada" -version = "0.4.8" +version = "0.4.9" source = { editable = "." } dependencies = [ { name = "aiosqlite" },