製作自訂詞庫
店裡的菜單、同學和老師的名字、專業術語、遊戲角色,內建詞庫裡沒有的詞,可以做成自己的詞庫匯入瑪嗒瑪嗒。詞表是純文字,一行一個詞,交給 AI 整理最省事,自己寫也可以。
匯入後怎麼打
# 拉麵店打工
店長 | てんちょう | pinyin: dianzhang
ポイントカード | english: point card
エリンギ | chinese: 杏鲍菇 | pinyin: xingbaogu
仕込む | しこむ | pos: v5m
- 打羅馬字
tenchou、假名てんちょう或拼音dianzhang,都會出「店長」;用拼音打時,候選字上方標出讀音てんちょう。 - 打
pointcard,出「ポイントカード」。 - 打
xingbaogu,出「エリンギ」,候選字上方顯示「杏鲍菇」。 - 長按「仕込む」,可以換成仕込みます、仕込んだ等變化和敬語。
所以讀音一定要準,拼音、英文和詞性能填就填上。
請 AI 幫你做
请按下面这份说明,帮我制作一个玛嗒玛嗒自定义词库。
Madamada Word List: instructions for AI assistants
You are helping someone make a custom dictionary for Madamada (玛嗒玛嗒,
マダマダ), an iOS Japanese keyboard for native Chinese speakers. In Madamada
people type Chinese pinyin to get Japanese kanji, English to get katakana,
and romaji or kana as on any Japanese keyboard. A custom dictionary adds
their own words: the names of people they know, their shop's menu, the terms
of their major, the characters of a game they play.
Your job: talk with them, collect the right words, and deliver one plain-text
word list in the format below. They paste it into the app (词库 > 自定义 >
导入 in Chinese, 辞書 > カスタム > 読み込む in Japanese) and every word works
at once.
Language: talk to the user in the language they write to you in, usually
Chinese or Japanese, for every question and answer. Only the format's keys
(pinyin, english, chinese, pos, priority) stay in English.
== What a word does in the keyboard ==
With this line in the list:
店長 | てんちょう | pinyin: dianzhang
- typing tenchou in romaji, or てんちょう in kana, offers 店長;
- typing the pinyin dianzhang offers 店長, with its reading てんちょう shown
above it.
With `english: point card`, typing pointcard offers ポイントカード. With
エリンギ | chinese: 杏鲍菇 | pinyin: xingbaogu
typing xingbaogu offers エリンギ with 杏鲍菇 shown above it, where the
reading usually goes; the same works for loanwords (チャーシュー with
`chinese: 叉烧 | pinyin: chashao`). With `pos: v1` on a verb, holding the
candidate lets the user pick its conjugations and polite forms. So the
reading must be exactly right, and pinyin, english and pos are worth adding
wherever they apply.
== Steps ==
1. Ask what they need
Before collecting anything, ask in one short message:
- the topic, and what they will be typing it for (for example "my
part-time job at a ramen shop", "my classmates' names", "the terms
of my major");
- roughly how many words (suggest 50 to 300) and anything that must be in
or left out;
- any material they already have: a list, a menu, a class roster, text
from a screenshot. Their own material comes first.
If their first message already answers this, go straight to step 2. Ask
again later only when something is truly unclear.
2. Collect the words
- Start from their material, then add what the topic needs. If you can
search the web, use it for names, product names, place names and
anything you are not sure of.
- Every word must be real and used in Japan, in the written form Japanese
people use. Never invent a word, a reading or a Chinese name. If you
cannot confirm one, leave it out, or ask.
- Readings are where mistakes happen. Names often read irregularly
(東海林 is しょうじ); check each one. If a name has several readings and
you cannot tell which one they mean, ask, or give one line per reading.
- Include what they will actually type: the full form and the common short
form (スマートフォン and スマホ), verbs and adjectives in their dictionary
form (食べる, not 食べます).
3. Write the list in the format below.
4. Check every line before you answer, and fix what fails:
- The first line is `# ` and the list's name.
- Every other line is a word line, a blank line, or a `#` comment.
- Each reading is the real reading of that word, in hiragana. Read every
kanji word's reading once more.
- No value contains `|`, an ASCII comma `,` or a double quote `"`.
- Each pinyin and english value is letters only, 2 to 40 letters once
spaces are removed.
- Each pos is from the table and fits the reading's ending.
- Each priority is a whole number from 1 to 9999.
- No line repeats another; every word is one you could confirm.
If you can run code, write a short script for these checks and run it.
5. Deliver
- Put the whole list in ONE code block, with nothing else inside it.
- After the block, in the user's language: how many words it has, and how
to import it: copy the block, then in Madamada open 词库 > 自定义 > 导入 >
粘贴 (辞書 > カスタム > 読み込む > ペースト). A saved .txt file works too:
导入 > 选择文件 (読み込む > ファイルを選ぶ), or share the file to Madamada.
- More than about 300 words: if you can create files, offer a .txt file to
download. Otherwise split the list into parts of about 300 words, each
a complete list with its own name line (for example "拉面店打工 1",
"拉面店打工 2"); each part is imported on its own.
- Then answer their questions and make the changes they ask for, in their
language, giving the whole updated list again each time.
== Format ==
# 拉面店打工
店長 | てんちょう | pinyin: dianzhang
山田 | やまだ | pinyin: shantian | priority: 9000 | note: 店长
替え玉 | かえだま
まかない
チャーシュー | chinese: 叉烧 | pinyin: chashao
ポイントカード | english: point card
仕込む | しこむ | pos: v5m
濃い | こい | pos: adj-i
The file
- Plain UTF-8 text, one word per line.
- The first line is `# ` and the list's name, in the user's language, at most
40 characters.
- Blank lines are fine. Any later line starting with `#` is a comment; you
may use comments as section headings.
- No header row, no line numbers, no quotes around values.
- At most 100,000 words, 1,024 bytes per line and 8 MB. The app keeps up to
20 custom dictionaries.
A word line
word | reading | key: value | key: value ...
- Fields are separated by `|`. The first is the word, the second its
reading; the rest are `key: value` pairs, in any order.
- pinyin and english may appear more than once on a line. A word with two
readings takes two lines.
- Any other field is ignored, so `note: ...` can carry a short note.
word (required)
How the word is written, exactly as it should appear. At most 32
characters. No `|`, ASCII comma or double quote, and it must not start with
`=`, `+`, `-` or `@`.
reading (required, except for a word written only in kana)
Its Japanese reading in hiragana; the long vowel mark ー is allowed (らーめん).
No spaces, romaji or kanji, at most 32 characters. Leave the reading out
only when the word is written entirely in kana (まかない, チャーシュー);
the word itself is then the reading. A word with any other character (漢字,
・, letters, digits) needs its reading.
pinyin: (optional, may repeat)
The pinyin a Chinese speaker would type for this word. Give it in two cases:
- The word is written only in kanji (々 counts), 2 to 6 of them: write the
Mandarin reading of each character, with Japanese forms turned into their
simplified Chinese ones: 店長 > 店长 > dianzhang, 駅前 > 驿前 > yiqian,
新宿 > xinsu. A character with two common readings gets two pinyin
fields (錦糸町: jinsiding, jinsiting).
- The line has a `chinese:` name: write that name's pinyin
(杏鲍菇 > xingbaogu).
Otherwise leave it out; never write the Japanese reading in romaji here.
No tones, ü is v (女性 > nvxing). 2 to 40 letters; spaces and tone marks
are tolerated and removed.
english: (optional, may repeat)
An English word or phrase that should also bring up this word. Give it for
katakana words borrowed from English, as their English source
(ポイントカード: point card, アイスクリーム: ice cream). Leave it out for
loanwords from other languages (アルバイト), made-in-Japan English
(サラリーマン) and words whose sense you are unsure of. 2 to 40 letters once
spaces, hyphens and other marks are removed.
chinese: (optional, once per line)
The usual Simplified Chinese name of the same thing, shown above the
candidate when the user typed its pinyin. Give it when the Japanese is
written in a way a Chinese reader would not recognise: katakana names and
loanwords (ニューヨーク: 纽约, チャーシュー: 叉烧), or kanji that mean
something else in Chinese. For a character, work or place from anime,
games or books, use the name of the mainland Chinese release, or else the
name Chinese fans most commonly use. Only a name you are sure of; with it,
give its pinyin. A thing with two common Chinese names takes one line per
name, each with its own pinyin (マグロ: 金枪鱼 jinqiangyu, and 吞拿鱼
tunnayu). Same character rules as word.
pos: (optional, once per line)
The part of speech. Leave it out for nouns, names and phrases. Give it for
verbs and adjectives so their conjugations work; the reading must end as
the table says, or the line is rejected.
v1 ichidan verb: reading ends in る after an い- or え-row kana
(食べる, 起きる)
v5k v5g v5s v5t v5n v5b v5m v5r v5u
godan verb ending in く ぐ す つ ぬ ぶ む る う (書く: v5k, 仕込む: v5m)
vk 来る and verbs ending in くる
vs a noun that takes する, written without する (勉強)
adj-i い-adjective: reading ends in い (濃い)
adj-na な-adjective, written without な (静か)
adv adverb
prt particle
other interjections, set phrases, anything else
n noun (the default)
priority: (optional, once per line)
1 to 9999, default 5000; higher comes first among words read the same way.
9000 or more puts the word before common words with its reading (the
user's own name, their shop's name); below 5000 puts it after them.
匯入詞表
AI 會先問你要做什麼詞庫,再蒐集、整理、逐行檢查,最後把詞表放在程式碼區塊裡給你。複製詞表,在 App 的「词库 › 自定义」點「导入 › 粘贴」。AI 給的是 .txt 檔案時,點「导入 › 选择文件」,或在其他 App 裡分享給瑪嗒瑪嗒。
詞表格式
# 拉麵店打工
店長 | てんちょう | pinyin: dianzhang
山田 | やまだ | pinyin: shantian | priority: 9000 | note: 店長
替え玉 | かえだま
まかない
チャーシュー | chinese: 叉烧 | pinyin: chashao
ポイントカード | english: point card
仕込む | しこむ | pos: v5m
濃い | こい | pos: adj-i
- UTF-8 純文字,一行一個詞。最多 10 萬詞,每行不超過 1024 位元組,整個檔案不超過 8 MB。
- 第一行是
#加詞庫名稱,最多 40 個字。之後以#開頭的行是註解,可以當小標題用;空行也沒關係。 - 不要標題列和行號,值的兩邊不加引號。
- 每行用
|隔開,先寫詞,再寫平假名讀音,後面是鍵: 值,順序不拘。全形的|和:也能辨識。不認得的鍵會被忽略,可以用note:寫備註。 - 一個詞有兩個讀音,就寫成兩行。
pinyin和english可以在一行裡寫好幾次,chinese、pos、priority每行只寫一次。
| 欄位 | 寫什麼 |
|---|---|
| 詞(必填) | 詞的寫法,和上字時完全一樣,最多 32 個字 |
| 讀音 | 平假名,可以用長音ー(らーめん),最多 32 個字;只用假名寫的詞可以不寫 |
pinyin: |
中文母語者會打的拼音,見下文 |
english: |
英文原詞,見下文 |
chinese: |
簡體中文名,用拼音打出時顯示在候選字上方 |
pos: |
詞性,見下文 |
priority: |
優先度,1 至 9999,預設 5000 |
詞和中文名最多 32 個字,不能有 |、半形逗號和雙引號,也不能以 =、+、-、@ 開頭。讀音裡不能有空格、羅馬字和漢字。詞裡只要有假名以外的字(漢字、・、字母、數字),就要寫讀音。
拼音怎麼寫
兩種情況寫 pinyin::
- 詞全部是漢字(々 也算),2 到 6 個字:按每個字的漢語拼音寫,日本字形先換成簡體。店長 → 店长 →
dianzhang,駅前 → 驿前 →yiqian,新宿 →xinsu。一個字有兩種常見讀音時寫兩個pinyin:,例如錦糸町寫jinsiding和jinsiting。 - 這一行有
chinese::寫中文名的拼音,杏鲍菇 →xingbaogu。
其他情況不寫,也不要把日文讀音的羅馬字寫進來。不帶聲調,ü 寫成 v(女性 → nvxing),2 到 40 個字母;空格和聲調符號會自動去掉。
英文與中文名
english: 只給來自英文的片假名詞,寫它的英文原詞:ポイントカード寫 point card,アイスクリーム寫 ice cream。來自其他語言的外來語(アルバイト)、和製英語(サラリーマン)和沒把握意思的詞不寫。只寫字母和空格,去掉空格後是 2 到 40 個字母。
chinese: 寫這個東西通常的簡體中文名,用拼音打出時顯示在候選字上方,也就是平常顯示讀音的位置。日文寫法讓中文讀者認不出來時才需要它:片假名的人名、地名和外來語(ニューヨーク:纽约,チャーシュー:叉烧),或是在中文裡意思不一樣的漢字詞。動漫、遊戲和書裡的角色、作品和地名,用中國大陸的官方譯名,沒有就用中文粉絲最常用的叫法。
只寫有把握的中文名,寫了就配上它的拼音。有兩個常見中文名時寫成兩行,各配拼音:マグロ寫金枪鱼 jinqiangyu 和吞拿鱼 tunnayu 兩行。
詞性
動詞、形容詞和能接する的名詞寫上 pos:,長按才能換變化和敬語。一般名詞、人名和片語不用寫。讀音的結尾要和詞性對得上,否則這一行會被略過。
| pos | 用在哪裡 |
|---|---|
v1 |
一段動詞,讀音以る結尾,る前面是い段或え段假名:食べる、起きる |
v5k v5g v5s v5t v5n v5b v5m v5r v5u |
五段動詞,讀音依序以く、ぐ、す、つ、ぬ、ぶ、む、る、う結尾:書く是 v5k,仕込む是 v5m |
vk |
来る,以及以くる結尾的動詞 |
vs |
能接する的名詞,不寫する:勉強 |
adj-i |
い形容詞,讀音以い結尾:濃い |
adj-na |
な形容詞,不寫な:静か |
adv |
副詞 |
prt |
助詞 |
other |
感嘆詞、固定說法等 |
n |
名詞,不寫時預設是它 |
優先度
priority: 是 1 至 9999 的整數,預設 5000。讀音相同的詞,數值大的排在前面。9000 以上會排在同讀音的常用詞前面,適合自己的名字和店名;低於 5000 則排在常用詞後面。
AI 的步驟
AI 照下面幾步做,全程用使用者的語言回答,只有格式裡的鍵名(pinyin、english、chinese、pos、priority)照原樣寫,不翻譯。
先用一則簡短的訊息問清楚:詞表要做什麼用(例如「拉麵店打工」「同學的名字」「專業術語」),大概要多少詞(建議 50 到 300),有沒有一定要收或不要收的詞,手邊有沒有名單、菜單或截圖裡的文字。使用者第一句話已經說清楚的,直接開始;之後只在真的不清楚時再問。
先用使用者給的資料,再補這個主題需要的詞。能上網就查人名、商品名、地名和拿不準的詞。每個詞都要是日本真實在用的詞,用日本人的寫法。不編造詞、讀音和中文名,確認不了就不收,或是問使用者。人名讀音常常不規則(東海林讀しょうじ),要逐一核對;有幾種讀法又判斷不了時,問使用者,或是每種讀法寫一行。完整說法和常用簡稱都收(スマートフォン和スマホ),動詞和い形容詞用辭書形(食べる,不是食べます),能接する的名詞不帶する(勉強),な形容詞不帶な(静か)。
按上面的格式寫成詞表,詞庫名稱用使用者的語言。
給使用者之前逐行檢查,有問題就改:
- 第一行是
#加詞庫名稱。 - 其餘每行只能是詞行、空行或
#註解。 - 寫了讀音的,讀音是這個詞真正的讀音,用平假名;漢字詞的讀音再核對一遍。
- 值裡沒有
|、半形逗號和雙引號。 pinyin和english去掉空格後是 2 到 40 個字母。pos在上面的表裡,而且和讀音的結尾對得上。priority是 1 至 9999 的整數。- 沒有重複的行,每個詞都確認過。
能執行程式的話,寫個小腳本把這些檢查跑一遍。
- 第一行是
一份詞表放進一個程式碼區塊,區塊裡不放別的。區塊後面用使用者的語言說明一共多少詞、怎麼匯入:複製程式碼區塊,在瑪嗒瑪嗒裡打開「词库 › 自定义 › 导入 › 粘贴」(日文介面是「辞書 › カスタム › 読み込む › ペースト」);存成 .txt 檔案的,點「导入 › 选择文件」(「読み込む › ファイルを選ぶ」),或在其他 App 裡分享給瑪嗒瑪嗒。超過 300 詞時,能產生檔案就提供 .txt 下載;不能就拆成每份 300 詞左右的幾份,每份都是完整的詞表,有自己的名稱行(如「拉麵店打工 1」「拉麵店打工 2」),各放一個程式碼區塊,分別複製、匯入。之後按使用者的要求修改,每次都給出完整的新詞表。
常見問題
匯入時提示略過了幾行? 有問題的行不會匯入,瑪嗒瑪嗒會告訴你是第幾行、什麼原因。把提示傳給 AI 請它改,或自己改好後重新匯入。
想改詞表裡的詞? 把要改的地方告訴 AI,它會給出完整的新詞表。重新匯入會多出一個詞庫,把舊的刪掉就好。
能分享給朋友嗎? 詞表就是一段文字,傳給對方,在瑪嗒瑪嗒裡匯入就能用。