AI 研究套件

让你自己的 AI 助手接入本语料库——你的模型、你的账号,我们这边无需任何密钥。通过 MCP 接入,或直接调用公开 API,助手即可浏览、阅读、检索并生成 750 部文献、共 96,093 页的语境索引。

你不需要懂编程,也不需要安装任何东西。下面的第一步,用大多数聊天助手的免费版本就能完成。

1

从这里开始——无需任何设置

如果你已经在浏览器里用 ChatGPT、Claude、Gemini 或 Copilot,大约一分钟就能让这个文库为你所用。

  1. 用「复制」按钮复制下面这段文字。
  2. 打开与助手的新对话,把它作为第一条消息粘贴进去。表面上似乎什么也没发生——这是正常的,它是说明,不是提问。
  3. 然后用平常的话提出你的研究问题。助手会检索本文库,并在回答中附上指向原书页面的链接。
研究助手提示词
You are a research assistant for classical Vietnamese Hán-Nôm texts. You have read-only access to the Việt Điển corpus — 750 digitized Hán-Nôm texts (96,093 pages of OCR) — through a public JSON API (HTTP GET, no auth) at https://www.viet-dien.com.

Endpoints — reach for distribution and concordance first; they answer most
questions in one call, where search makes you page through results:
- https://www.viet-dien.com/api/v1/distribution?q=<query>          Which texts carry <query>, and how heavily, heaviest first. Call this first on a broad question, to choose what is worth reading.
- https://www.viet-dien.com/api/v1/concordance?q=<query>&width=30  Every occurrence of <query> across the corpus, one line each with context either side. This is how you read usage: senses, collocations and set phrases show themselves when the occurrences are lined up together, and one-snippet-per-page search hides them.
- https://www.viet-dien.com/api/v1/search?q=<query>               Pages whose OCR contains <query>, one snippet each. Returns text_id, title, title_han, item_id, page_number, snippet, viewer_url.
- https://www.viet-dien.com/api/v1/texts?q=<title>                Find texts by romanized or Hán (Sinitic) title.
- https://www.viet-dien.com/api/v1/texts/<id>                     A text's metadata and list of page numbers.
- https://www.viet-dien.com/api/v1/texts/<id>/pages/<n>?context=1  The OCR of one page, plus the source page-image URL. A classical sentence runs straight across the page break, so pass context=1 when quoting near a page edge, or the clause ends mid-air.
- https://www.viet-dien.com/api/v1/texts/<id>/full.txt            A whole work as plain text, pages marked — use it instead of forty page fetches when you need to read a text through.
- https://www.viet-dien.com/api/v1/variants?q=<char>              Which other glyph forms search treats as this character, so you can explain a match rather than assert it.

Search syntax (all of it works in q=, and is worth using — the words of a
classical collocation are often separated, so a plain phrase search misses them):
  國家              the characters together, in order
  "見聞 小錄"        quoted phrase
  國 AND 家         both somewhere on the same page
  國家 OR 天下       either one
  國 NOT 家         the first, without the second
  國 NEAR/10 家     within 10 characters of each other
  國?家             ? is any single character
  見聞*錄            * is a short gap (up to 8 characters)
Malformed queries return HTTP 400 with a "detail" message explaining the problem.

Requests are rate limited to 60/minute and 1000/hour per client, so work through
results steadily rather than fanning out; HTTP 429 means slow down and retry.

How to help me:
1. Search first, then fetch the specific pages you cite.
2. The material is Classical Chinese / Chữ Nôm and the OCR is machine-generated, so it may contain errors — read critically and flag uncertainty.
3. Always include Việt Điển links in your answers: cite every source as a clickable link to its viewer_url (a page on https://www.viet-dien.com) so I can open the original page image and OCR. Never cite a page without linking it.
4. For a character or phrase, tell me which texts and pages it appears on, link each with its viewer_url, and quote the surrounding snippet.

Corpus source: Digitizing Vietnam (https://www.digitizingvietnam.com).

这种方式在具备联网能力的助手上效果最好。如果你的助手回答说无法打开链接,说明它接触不到本文库——请改用第二步,或换一个助手。

2

通过 MCP 接入

可选

有些助手可以被赋予自己的工具。如果你的助手有 Connectors、Integrations 或 MCP servers 这类设置,添加下面这一个地址会比第一步更好:助手将获得专用的检索工具,而你再也不必粘贴任何说明。

服务器地址
https://www.viet-dien.com/mcp

添加到哪里

  • Claude(claude.ai 或桌面应用):设置 → Connectors → Add custom connector,然后粘贴地址。付费方案可用。
  • ChatGPT:设置 → Connectors,作为自定义 MCP 连接器添加。可能需要先打开开发者模式。
  • Cursor、Claude Code 以及其他提到「MCP」的工具:找到「Add server」,选择 HTTP 或远程 URL 方式。

这些菜单的措辞时有变动;你要找的是任何要求填写远程 MCP 服务器地址的地方。添加之后,助手已经知道如何使用本文库,你可以直接提问——不必再粘贴任何文字。

进阶:改为粘贴到配置文件中
{
  "mcpServers": {
    "viet-dien": {
      "type": "http",
      "url": "https://www.viet-dien.com/mcp"
    }
  }
}
3

可以问什么

用平常的话提问即可——中文、越南文或英文——手头有汉字就一并给出。适合这类文库的问题例如:

“这些文献中哪些谈到 科舉(科举制度)?哪一部谈得最多?”

任何题目的好起手:在你决定投入精读之前,先知道哪几部值得读。

“找出 皇越 出现的每一处,并给我看每一处前后的原文。”

把各处用例并排看,才能看出一个词在实际使用中的意思,而不是词典上的意思。

“見聞 有没有出现在 小錄 附近?不一定紧挨着——十个字以内即可。”

古典词语在书页上常被拆开。问「附近」而不是「完全一致」,才能找到普通检索会漏掉的例子。

“读一下《見聞小錄》卷一的前十页,逐页概括内容。”

用来在陌生的书里先摸清方向,再决定哪里值得细读。

如何看待答案

  • 助手读到的文字,是刻本的机器转写,未经校订。个别字有时就是错的。
  • 一定要点开链接。每个答案都应附有指向本站页面的链接,那里可以看到原始书影与转写并列。没有链接的说法,一律视为未经核实。
  • 「没找到」是很弱的证据。某个词可能确实存在,只是被转写错了,或者出现在尚未数字化的书里。此处的缺席不等于文献中的缺席。
  • 请引用原书,而不是引用助手。顺着链接自己把那一页读过,再像引用馆藏图书那样注明书名与页码。
面向开发者 API 参考、工具清单、架构

公开 API

同一语料库的普通 HTTP GET 接口,供不支持 MCP 的客户端使用。只读、支持 CORS 的 JSON,无需密钥。基础地址: https://www.viet-dien.com

GET /api/v1/stats Corpus totals 试一试 ↗
GET /api/v1/texts?q=易&limit=20 List / filter texts by title 试一试 ↗
GET /api/v1/texts/11 A text's metadata + page numbers 试一试 ↗
GET /api/v1/texts/11/pages/1?context=1 A page's OCR + image URL, with the pages either side 试一试 ↗
GET /api/v1/texts/11/full.txt A whole work as plain text 试一试 ↗
GET /api/v1/search?q=國&limit=20 Full-text OCR search 试一试 ↗
GET /api/v1/concordance?q=國家&width=30 Every occurrence of a term, in context 试一试 ↗
GET /api/v1/distribution?q=國家 Which texts carry a term, heaviest first 试一试 ↗
GET /api/v1/variants?q=為 A character's interchangeable forms 试一试 ↗
GET /api/openapi.json OpenAPI 3 schema (for tool import) 试一试 ↗

助手将获得的工具

search_corpus Find pages whose text contains a query, with a snippet of each. Good for "where does this appear"; for "how is it used" prefer concordance, and for "which works" prefer distribution.
concordance Every occurrence of a term across the corpus, one line each with context either side (a KWIC concordance). This is the tool for reading usage: senses, collocations and formulae show up when the occurrences are lined up together, which one-snippet-per-page search hides.
distribution Matching pages grouped by work, heaviest first. Call this first on any broad question: it tells you where a term lives before you spend calls reading pages.
get_page One page's OCR text, with the URL of the source page image and a viewer link to cite. Pass context to pull in the pages either side — a classical sentence runs across the page break, so a quotation from one page alone can end mid-clause.
get_full_text A whole work (or a run of pages) in one call, pages marked. Use it instead of forty get_page calls when you need to read a text through rather than check a citation. Ask for a page range on a long work.
list_texts The works in the corpus, filtered by title — romanized (Đại Việt sử ký) or Sinitic (大越史記) — or by catalogue field: author, year of composition, subject, language. Use it to find a work by who wrote it, when, or what it is about; use distribution to find one by content. Diacritics are ignored throughout, so "nguyen" finds "Nguyễn". Cataloguing is uneven: an author is recorded for about 39% of the corpus and a year for about 49%, so a year filter cannot see the undated remainder — do not report an empty or short result as evidence that the corpus holds nothing of that kind.
get_text_info One work's metadata and the page numbers actually digitized (they need not be contiguous), plus links to the viewer and to the item on Digitizing Vietnam.
char_variants Which other forms of a character search treats as the same. Woodblock carvers used whichever glyph they liked, so 為 and 爲 are one word; this reports the grouping, so you can explain a match rather than assert it.
corpus_stats How many works and pages are currently digitized. Worth checking before making a claim about coverage.

其他接入方式