From c9785eb94475bdc902b8e16551f26f2308502320 Mon Sep 17 00:00:00 2001 From: iacore Date: Mon, 15 Jun 2026 17:41:20 +0800 Subject: [PATCH] docs: push Terms DB detail to terms-search skill; AGENTS.md keeps brief pointer --- AGENTS.md | 6 +++--- skills/terms-search/SKILL.md | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6382a21..e62b680 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,9 +16,9 @@ Available: `translation`, `terms-search`, `translation-review`, `chinese-text-no ## Terms Database -- DB: `terms-search/termlib.duckdb` -- CLI: `terms-search/search.py [limit]` (preferred over HTTP) -- Module: `from search import search; search("空性", limit=5, loc="...", src="...")` → list of `{zh, en, loc, source}` dicts +See `terms-search` skill. Quick reference: +- CLI: `terms-search/search.py [limit]` +- Module: `from search import search; search("空性", limit=5, src="DoT定稿")` - Priority: DoT定稿 > 内部特色词 > 佛教术语 > 经论名 ## Directory Structure diff --git a/skills/terms-search/SKILL.md b/skills/terms-search/SKILL.md index c6500e4..1e6a864 100644 --- a/skills/terms-search/SKILL.md +++ b/skills/terms-search/SKILL.md @@ -18,6 +18,18 @@ Server: `/home/user/documents/mpi/terms-search/server.py` Multi-word queries are ANDed. Searches both `zh` and `en` columns. +## Python module + +```python +import sys +sys.path.insert(0, '/home/user/documents/mpi/terms-search') +from search import search +results = search("空性", limit=5, src="DoT定稿") +# → list of {zh, en, loc, source} dicts +``` + +Use this inside `execute_code` scripts for batch lookups — no subprocess needed. + ## HTTP API (use only when CLI is insufficient) Start: `python3 /home/user/documents/mpi/terms-search/server.py` (port 8910)