Dictionary definitions (D) |
D <dictionary> <flags>
eg.
D User.dic 0 D Kata.pak 1 D Yomi.pak 2
Add a new dictionary to the input method. Currently input methods can have eight different dictionaries, which are searched in the order in which they are specified. <flags> is a 32bit number in decimal (or in hex preceded by a $ sign in V3), which specifies the following flags:
1 | A katakana dictionary. Contains only Yomi entry in hiragana. Only exact matches. |
2 | Use repeated stripping of trailing "okurigana" characters to find all matches. |
4 | Each replacement consists of a single character, and there is no separation between the different choices. Used to save space for Hanja and Chinese dictionaries. |
8 | PinYin dictionary (V3 only). |
0x10 | Ignore tones in Pinyin (V3 only). |
0x20 | ZhuYin dictionary (V3 only). |
0x40 | Interpret Japanese grammar rules. |
Dictionaries that don't exist are simply not used. The existing ones are used in the order in which they are listed.
Dictionaries can be of two types: plain text in UTF-8; or compressed. The compression format is proprietary.
The dictionary structure is:
<yomi><space><kanji1>,<kanji2>,<kanji3><LF>
eg.
かんじ 感じ,漢字,監事
'Syntactic analysis': The Kanji list can contain the special tokens H and K to indicate using the yomi as is (H) or converted to Katakana (K). Also, a Kanji entry can end with a "rule". These rules are version specific and should not be used by third parties.
Dictionary definitions (D) |