/ingest — 分析並收錄單字
這是本專案的核心指令。只要提供一個英文單字,系統便會自動完成語素拆解、建立字典頁面、設置雙向連結並更新索引 —— 所有流程一氣呵成。
/ingest — Analyze and add a word
The workhorse command of this project. You give it an English word; it does the morpheme breakdown, writes the dictionary page, links it both ways to the morpheme files, and updates the index — all in one go.
為什麼需要這個功能?
若要手動將單字加入字典,您通常需要執行以下繁瑣步驟:
- 查詢 IPA 發音、撰寫中文釋義並考據詞源。
-
將單字拆解為字首、字根或字尾(語素 Morpheme:組成單字的最小意義單位。例如將
unbelievable拆解為un-、believe、-able)。 -
在
dictionary/words/<word>.md建立新檔案,並確保 Frontmatter 與標題格式正確。 -
分別前往
dictionary/prefix/、dictionary/root/、dictionary/suffix/對應的語素檔案,在「Words containing this」清單中手動填入新單字並維持字母排序。 - 手動更新
dictionary/index.md索引。
每個單字至少需調整 4 至 6 個檔案,極易漏掉反向連結。/ingest
透過自動化流程解決了這些問題,讓您只需專注於學習單字本身。
Why this exists
To add one word to this dictionary by hand, you would normally need to:
- Look up the IPA, write a definition, dig up the etymology.
-
Split the word into prefixes, root, and suffixes (morphemes — the
smallest meaningful units of a word, e.g.
unbelievablesplits intoun-,believe,-able). -
Create a new
dictionary/words/<word>.mdfile with the correct frontmatter and sections. -
Open each matching morpheme file under
dictionary/prefix/,dictionary/root/,dictionary/suffix/and add the new word to its "Words containing this" list, in alphabetical order. - Update
dictionary/index.md.
That's 4–6 files per word, and it's easy to forget a back-link.
/ingest does the whole thing automatically. You only
supply the word.
操作範例
在 Claude Code 對話框輸入:
/ingest unbelievable
稍等片刻,Claude 會建立完成的單字檔案。dictionary/words/unbelievable.md
內容範例(節錄):
---
word: unbelievable
pos: adj.
ipa: /ˌʌn.bɪˈliː.və.bəl/
added: 2026-05-24
---
# unbelievable
**詞性**: adj.
**IPA**: /ˌʌn.bɪˈliː.və.bəl/
**中文釋義**: 難以置信的;不可思議的
## 拆解
- 字首: [[../prefix/un-]] `un-` — 否定、相反
- 字根: [[../root/believe]] `believe` — 相信
- 字尾: [[../suffix/-able]] `-able` — 形容詞字尾,「可…的」
## 詞源
…(說明 believe 源於古英語 belyfan 等歷史背景)
## 記憶法
…(連結語素或意象的記憶提示)
## 筆記區
在此次操作中,以下三個語素檔案的
## Words containing this 區塊也會自動填入
- [[../words/unbelievable]]:
dictionary/prefix/un-.mddictionary/root/believe.mddictionary/suffix/-able.md
若對應的語素檔案尚不存在,/ingest
會一併建立。這種「雙向連結」確保了單字與語素間的知識網絡是完整且可互查的。詳情請見
什麼是 Morphowiki。
語言設定:上方範例中的釋義與詞源為中文(zh-TW),因為系統預設服務中文使用者。輸出語言可透過專案根目錄的
CLAUDE.md 進行調整(如改為全英文),詳見
自訂與微調。
A concrete example
In the Claude Code chat, type:
/ingest unbelievable
After a few seconds, Claude reports the breakdown and writes the
files. The new dictionary/words/unbelievable.md looks
roughly like this (abridged):
---
word: unbelievable
pos: adj.
ipa: /ˌʌn.bɪˈliː.və.bəl/
added: 2026-05-24
---
# unbelievable
**詞性**: adj.
**IPA**: /ˌʌn.bɪˈliː.və.bəl/
**中文釋義**: 難以置信的;不可思議的
## 拆解
- 字首: [[../prefix/un-]] `un-` — negation, reversal
- 字根: [[../root/believe]] `believe` — to trust as true
- 字尾: [[../suffix/-able]] `-able` — adjective suffix, "capable of"
## 詞源
…(two to four sentences on the history of believe, from Old English belyfan, etc.)
## 記憶法
…(one to three sentences of a mnemonic linking the morphemes)
## 筆記區
In the same operation, each of these three morpheme files has a new
line - [[../words/unbelievable]] added under its
## Words containing this section:
dictionary/prefix/un-.mddictionary/root/believe.mddictionary/suffix/-able.md
If any of those morpheme files don't exist yet,
/ingest creates them. This is the "two-way link": the
word page points to morphemes, and the morphemes point back at every
word that uses them. Read
What is a Morphowiki for
the full picture.
About the language: the sample above shows
Chinese definitions and notes because this dictionary defaults to
Chinese-speaking users. The actual output language is controlled
by CLAUDE.md in your project root and can be switched
to English, Japanese, and so on — see
Customize & tune.
About section names: the section headings
## 拆解 / 詞源 / 記憶法 / 筆記區 (Breakdown /
Etymology / Mnemonic / Your notes) are fixed in Chinese for now —
they are how the review web app finds the content. Don't rename
them by hand.
逐步操作步驟
-
確認已執行過
/setup(確保dictionary/資料夾與stopwords.md已建立)。 -
在專案根目錄啟動 Claude Code(在終端機輸入
claude)。 -
輸入
/ingest指令並接續您想收錄的英文單字,例如:/ingest predictable - 等待系統分析。成功後,系統會列出拆解詳解(字首/字根/字尾)、新建檔案與更新檔案的清單。
-
開
dictionary/words/predictable.md確認結果。您可以自由編輯## 筆記區以記錄個人例句或學習心得;其餘區塊則建議交由/ingest或/lint協助管理。
批次收錄與精確過濾:您可以一次輸入多個單字,甚至是一長串句子。/ingest
會自動斷詞、過濾常見虛詞(Stopwords),並為所有新字建立檔案:
/ingest predictable formation rebuild
/ingest The international cooperation project was a success.
在句子模式下,the、was、a
等單字會被 Stopwords
名單過濾。收錄完成後,系統會提供一份簡要的統計報告。
遞迴式收錄:若收錄的單字包含其他具獨立意義的複合同根字(例如
international 內含 national 與
nation),/ingest
會主動詢問或自動為這些單字建立頁面。單次操作可能會一次產生數個相關單字,這有助於建立完整的字群記憶。
Step by step
-
Make sure you've already run
/setup(it createsdictionary/andstopwords.md). If not, go do that first. -
Open Claude Code from inside the project folder (run
claudein your terminal). -
In the chat box, type
/ingestfollowed by an English word, for example:/ingest predictable - Wait for Claude's report. It lists the breakdown (prefix / root / suffix), the new files it created, and the existing files it updated.
-
Open
dictionary/words/predictable.mdto check the result. You're free to edit the## 筆記區("Your notes") section to add your own example sentences or teaching reminders — leave the other sections to/ingestand/lint.
Batch and whole sentences: you can pass several
words at once, or even a full English sentence.
/ingest tokenizes it, filters out common function
words, and ingests each new word once:
/ingest predictable formation rebuild
/ingest The international cooperation project was a success.
Recursive intermediate words: if the word you
ingest contains shorter English words inside it (e.g.
international contains national and
nation), /ingest will also create
dictionary pages for those intermediates. A single command can
produce two or three extra word files. This is intentional.
常見錯誤與下一步
常見錯誤 1 — 收錄太簡單的字:像
the、a、it、is
這類字,被列在
dictionary/stopwords.md 的白名單裡。對它們執行
/ingest 會被拒絕,回應類似「the 已在
stopwords
(default),不會建立字典頁」。這是刻意的——這些字不該佔複習庫的位置。要看完整列表,直接打開
dictionary/stopwords.md。
常見錯誤 2 — 拼錯字:/ingest belivable(漏一個
e)還是會被當合法輸入處理,Claude 會努力給出一個拆解。先在 Google
或字典查一下拼寫,再 ingest。
常見錯誤 3 — 已經收錄的字:如果該單字已經有
dictionary/words/<word>.md,/ingest
會回報「已存在」並跳過,不會覆蓋你之前手動加在
## 筆記區
的內容。這是保護機制。真的要重來,先把舊檔刪掉再 ingest。
常見錯誤 4 — 給中文字:這個 skill 不處理中文。給中文詞它會問你要做什麼。
下一步:
-
想用現有的字根字首自動造幾個新單字練手?試
/new-word。 -
想確認整個字典的雙向連結都對得上?跑
/lint。 -
想把新收錄的字加入你的複習庫?用
/flashcard。 - 想換輸出語言(中文 → 英文 → 日文…)或微調別的細節?見 自訂與微調。
回 首頁。
Common mistakes & next steps
Mistake 1 — Ingesting a word that's too simple:
words like the, a, it,
is are in the allow-list at
dictionary/stopwords.md. Calling
/ingest on them is refused with a message like "the
is in stopwords (default), no dictionary page will be created."
This is intentional — these words don't belong in a vocab-learning
deck. Open dictionary/stopwords.md to see the full
list.
Mistake 2 — Misspelling:
/ingest belivable (missing an "e") will still be
treated as a valid input; Claude will do its best to break it
down. Spell-check first.
Mistake 3 — Already-ingested word: if
dictionary/words/<word>.md already exists,
/ingest reports "already exists" and skips, so it
never overwrites the notes you wrote by hand in
## 筆記區. This is a safety net. To regenerate from
scratch, delete the old file first.
Mistake 4 — Passing Chinese: this skill only handles English. Give it a Chinese word and it will ask what you meant.
Next steps:
-
Want to auto-generate new words from your existing morphemes for
practice? Try
/new-word. -
Want to verify that every two-way link in the dictionary still
matches? Run
/lint. -
Want to add a freshly ingested word to your own review deck? Use
/flashcard. - Want to change the output language (Chinese → English → Japanese…) or tweak other details? See Customize & tune.
Back to home.