├── .gitattributes ├── .gitignore ├── README.md ├── luna_pinyin.dict ├── double_pinyin.custom.yaml ├── luna_pinyin.cn_en.dict.yaml ├── luna_pinyin.custom.yaml ├── luna_pinyin.extended.dict.yaml ├── luna_pinyin.hanyu.dict.yaml └── luna_pinyin.poetry.dict.yaml └── luna_pinyin_ziam_tuan.dict ├── luna_pinyin.custom.yaml ├── luna_pinyin.hanyu.dict.yaml ├── luna_pinyin.poetry.dict.yaml ├── luna_pinyin_ziam_tuan.dict.yaml └── luna_pinyin_ziam_tuan.extended.dict.yaml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Rime 擴充詞庫 2 | =========== 3 | 4 | ## 使用方法 5 | 6 | 1. 下載詞庫 https://github.com/rime-aca/dictionaries.git (或是直接 clone / pull 這個 repo) 7 | 8 | 注意到其中應該有六個檔案: 9 | 10 | ``` 11 | double_pinyin.custom.yaml 12 | luna_pinyin.custom.yaml 13 | luna_pinyin.hanyu.dict.yaml 14 | luna_pinyin.cn_en.dict.yaml 15 | luna_pinyin.extended.dict.yaml 16 | luna_pinyin.poetry.dict.yaml* 17 | ``` 18 | 19 | 2. 將上述檔案中後面五個移至你的 Rime 目錄底下 (depends on your OS),以 OS X 來說,就是在 `~/Library/Rime/` 底下 20 | 21 | ``` 22 | # 部署位置: 23 | # ~/.config/ibus/rime (Linux) 24 | # ~/Library/Rime (Mac OS) 25 | # %APPDATA%\Rime (Windows) 26 | ``` 27 | 28 | 3. 若爲雙拼使用者,請將 `double_pinyin.custom.yaml` 改名成你所使用的雙拼方案的代碼 29 | 如 `double_pinyin_abc.custom.yaml`,並放入第二步所說的目錄底下 30 | 若該目錄底下已有這個檔案,那麼將這兩個檔案中的內容 merge 即可 31 | 32 | 附雙拼方案與其對應的 id 一覽表: 33 | 34 | | 輸入方案 | id | 35 | |------------|--------------------| 36 | | 自然碼雙拼 | double_pinyin | 37 | | 智能ABC雙拼| double_pinyin_abc | 38 | | 小鶴雙拼 | double_pinyin_flypy| 39 | | MSPY雙拼 | double_pinyin_mspy | 40 | 41 | 4. 若爲「朙月拼音」系列輸入方案使用者,請將補靪文件 `luna_pinyin.custom.yaml` 改名爲你所使用的輸入方案對應的 id。(比如朙月拼音·簡化字方案,則將 `luna_pinyin.custom.yaml` 改名爲 `luna_pinyin_simp.custom.yaml`)。 42 | 43 | 驗證:切換到拼音或其他適用方案,輸入「一介書生」(驗證擴充詞庫之基本詞庫)、「一丈紅」(驗證擴充詞庫之漢語大詞典詞彙)、「疑是地上霜」(驗證擴充詞庫之詩詞詞庫)、輸入「哆啦A夢(duo la a meng)」(驗證擴充詞庫之西文詞庫,此子詞庫爲朙月拼音系列方案專有,雙拼方案不推薦使用)。 44 | 45 | ## 增加自己的詞庫 46 | 47 | 在這個架構底下增加自己的詞庫相當容易,只需新增一個自訂的 `*.dict.yaml` 檔案,內容可以仿照 `luna_pinyin.extended.dict.yaml`,並於其中引入 `luna_pinyin.extended` 及相關字典檔,例如: 48 | 49 | ``` 50 | # lazywei.dict.yaml 51 | --- 52 | name: lazywei 53 | version: "2015.1.10" 54 | sort: by_weight 55 | use_preset_vocabulary: true 56 | import_tables: 57 | - luna_pinyin 58 | - luna_pinyin.extended 59 | - luna_pinyin.hanyu 60 | - luna_pinyin.poetry 61 | ... 62 | 63 | 這是我的詞 64 | ``` 65 | 66 | 接着再於 `*.schema.yaml` 或 `*.custom.yaml` 中將 `translator/dictionary` 設置成此字典檔即可,例如: 67 | 68 | ``` 69 | patch: 70 | translator/dictionary: lazywei 71 | ``` 72 | 73 | 如此,往後 `luna_pinyin.extended` 升級時並不會影響到這個 `lazywei.dict.yaml`,所以直接將所有檔案覆蓋即可。 74 | -------------------------------------------------------------------------------- /luna_pinyin.dict/double_pinyin.custom.yaml: -------------------------------------------------------------------------------- 1 | # double_pinyin.custom.yaml 2 | # 3 | # 補靪功能:將自然碼雙拼的詞庫修改爲朙月拼音擴充詞庫 4 | # 5 | # 作者:瑾昀 6 | # 7 | # 部署位置: 8 | # ~/.config/ibus/rime (Linux) 9 | # ~/Library/Rime (Mac OS) 10 | # %APPDATA%\Rime (Windows) 11 | # 12 | # 於重新部署後生效 13 | # 14 | # 15 | # 注意:本補靪適用於所有雙拼方案(「自然碼雙拼」、「智能ABC雙拼」、「小鶴雙拼」、「MSPY雙拼」)。 16 | # 只須將本 custom.yaml 的前面名字改爲對應的輸入方案名字然後放入用戶文件夾重新部署即可。如 double_pinyin_abc.custom.yaml。 17 | # 朙月拼音用戶請使用 luna_pinyin.custom.yaml。 18 | # 19 | # 20 | # 附雙拼方案與其對應的 id 一覽表: 21 | # 輸入方案 id 22 | # 自然碼雙拼 double_pinyin 23 | # 智能ABC雙拼 double_pinyin_abc 24 | # 小鶴雙拼 double_pinyin_flypy 25 | # MSPY雙拼 double_pinyin_mspy 26 | # 27 | 28 | patch: 29 | # 載入朙月拼音擴充詞庫 30 | "translator/dictionary": luna_pinyin.extended 31 | -------------------------------------------------------------------------------- /luna_pinyin.dict/luna_pinyin.cn_en.dict.yaml: -------------------------------------------------------------------------------- 1 | # Rime dictionary 2 | # encoding: utf-8 3 | # 4 | # Luna Pinyin Extended Dictionary(Chinese&English) - 明月拼音擴充詞庫(含西文的詞彙) 5 | # 6 | # 瑾昀 7 | # 8 | # 部署位置: 9 | # ~/.config/ibus/rime (Linux) 10 | # ~/Library/Rime (Mac OS) 11 | # %APPDATA%\Rime (Windows) 12 | # 13 | # 於重新部署後生效 14 | # 15 | 16 | --- 17 | name: luna_pinyin.cn_en 18 | version: "2015.1.18" 19 | sort: by_weight 20 | use_preset_vocabulary: true 21 | ... 22 | 23 | 2B er b 100 24 | 2B er bi 100 25 | AA制 a a zhi 100 26 | AMD a m d 100 27 | ATI ati 100 28 | ATM機 a t m ji 100 29 | Android android 100 30 | Arduino arduino 100 31 | A他 a ta 100 32 | A他 ei ta 100 33 | A她 a ta 100 34 | A她 ei ta 100 35 | A死他 a si ta 100 36 | A死他 ei si ta 100 37 | A死她 a si ta 100 38 | A死她 ei si ta 100 39 | A片 a pian 100 40 | A盤 a pan 100 41 | A股 a gu 100 42 | B淋巴細胞 b lin ba xi bao 100 43 | B盤 b pan 100 44 | B細胞 b xi bao 100 45 | B股 b gu 100 46 | B超 b chao 100 47 | C盤 c pan 100 48 | C語言 c yu yan 100 49 | DNA d n a 100 50 | DVD d v d 100 51 | D盤 d pan 100 52 | E盤 e pan 100 53 | F盤 f pan 100 54 | Google google 100 55 | G盤 g pan 100 56 | G點 g dian 100 57 | H盤 h pan 100 58 | H股 h gu 100 59 | IP i p 100 60 | IPv6 i p v liu 100 61 | IPv4 i p v si 100 62 | IP位址 i p wei zhi 100 63 | IP卡 i p ka 100 64 | IP地址 i p di zhi 100 65 | IP電話 i p dian hua 100 66 | I盤 i pan 100 67 | J盤 j pan 100 68 | K他 k ta 100 69 | K他 kei ta 100 70 | K她 k ta 100 71 | K她 kei ta 100 72 | K寶 k bao 100 73 | K寶 kei bao 100 74 | K歌 k ge 100 75 | K歌 kei ge 100 76 | K死他 k si ta 100 77 | K死他 kei si ta 100 78 | K死她 k si ta 100 79 | K死她 kei si ta 100 80 | K粉 k fen 100 81 | K粉 kei fen 100 82 | K金 k jin 100 83 | K金 kei jin 100 84 | Linux linux 100 85 | MIPS m i p s 100 86 | MP3 m p san 100 87 | MP4 m p si 100 88 | Mac mac 100 89 | Nvidia nvidia 100 90 | POS機 p o s ji 100 91 | QQ q q 1000 92 | QQ會員 q q hui yuan 100 93 | QQ羣 q q qun 100 94 | QQ號 q q hao 100 95 | QQ號碼 q q hao ma 100 96 | QQ空間 q q kong jian 100 97 | QQ郵箱 q q you xiang 100 98 | Q幣 q bi 100 99 | Rime rime 100 100 | Rime zhong zhou yun 100 101 | SIM卡 s i m ka 100 102 | T型臺 t xing tai 100 103 | T恤 t xu 100 104 | T恤衫 t xu shan 100 105 | T淋巴細胞 t lin ba xi bao 100 106 | T細胞 t xi bao 100 107 | UIM卡 u i m ka 100 108 | USB u s b 100 109 | USIM卡 u s i m ka100 110 | U形管 u xing guan 100 111 | U盤 u pan 100 112 | U盾 u dun 100 113 | Wi-Fi wai fai 100 114 | Wi-Fi wi fi 100 115 | WiFi wai fai 100 116 | WiFi wi fi 100 117 | Windows windows 100 118 | Xeon xeon 100 119 | X光 x guang 100 120 | X刀 x dao 100 121 | X射線 x she xian 100 122 | X染色體 x ran se ti 100 123 | Y染色體 y ran se ti 100 124 | iMessage i message 100 125 | iOS i os 100 126 | iPad i pad 100 127 | iPhone i phone 100 128 | iPod i pod 100 129 | iWatch i watch 100 130 | z變換 z bian huan 100 131 | z逆變換 z ni bian huan 100 132 | α射線 a er fa she xian 100 133 | α粒子 a er fa li zi 100 134 | β射線 bei ta she xian 100 135 | β粒子 bei ta li zi 100 136 | γ刀 ga ma dao 100 137 | γ射線 ga ma she xian 100 138 | 三K黨 san k dang 100 139 | 三K黨 san kei dang 100 140 | 二B er b 100 141 | 二B er bi 100 142 | 傻B sha b 100 143 | 傻B sha bi 100 144 | 卡拉OK ka la o k 100 145 | 哆啦A夢 duo la a meng 100 146 | 單邊z變換 dan bian z bian huan 100 147 | 智能ABC zhi neng a b c 100 148 | 牛B niu b 100 149 | 牛B niu bi 100 150 | 裝B zhuang b 100 151 | 裝B zhuang bi 100 152 | 逗B dou b 100 153 | 逗B dou bi 100 154 | 阿Q a q 100 155 | 阿Q正傳 a q zheng zhuan 100 156 | -------------------------------------------------------------------------------- /luna_pinyin.dict/luna_pinyin.custom.yaml: -------------------------------------------------------------------------------- 1 | # luna_pinyin.custom.yaml 2 | # 3 | # 補靪功能:將朙月拼音的詞庫修改爲朙月拼音擴充詞庫 4 | # 5 | # 作者:瑾昀 6 | # 7 | # 部署位置: 8 | # ~/.config/ibus/rime (Linux) 9 | # ~/Library/Rime (Mac OS) 10 | # %APPDATA%\Rime (Windows) 11 | # 12 | # 於重新部署後生效 13 | # 14 | # 15 | # 注意:本補靪適用於所有朙月拼音系列方案(「朙月拼音」、「朙月拼音·简化字」、「朙月拼音·臺灣正體」、「朙月拼音·語句流」)。 16 | # 只須將本 custom.yaml 的前面名字改爲對應的輸入方案名字然後放入用戶文件夾重新部署即可。如 luna_pinyin_simp.custom.yaml。 17 | # 雙拼用戶請使用 double_pinyin.custom.yaml。 18 | # 19 | # 20 | # 附朙月拼音系列方案與其對應的 id 一覽表: 21 | # 輸入方案 id 22 | # 朙月拼音 luna_pinyin 23 | # 朙月拼音·简化字 luna_pinyin_simp 24 | # 朙月拼音·臺灣正體 luna_pinyin_tw 25 | # 朙月拼音·語句流 luna_pinyin_fluency 26 | # 27 | 28 | patch: 29 | # 載入朙月拼音擴充詞庫 30 | "translator/dictionary": luna_pinyin.extended 31 | # 改寫拼寫運算,使得含西文的詞彙(位於 luna_pinyin.cn_en.dict.yaml 中)不影響簡拼功能(注意,此功能只適用於朙月拼音系列方案,不適用於各類雙拼方案) 32 | # 本條補靪只在「小狼毫 0.9.30」、「鼠鬚管 0.9.25 」、「Rime-1.2」及更高的版本中起作用。 33 | "speller/algebra/@before 0": xform/^([b-df-hj-np-tv-z])$/$1_/ 34 | -------------------------------------------------------------------------------- /luna_pinyin_ziam_tuan.dict/luna_pinyin.custom.yaml: -------------------------------------------------------------------------------- 1 | # luna_pinyin.custom.yaml 2 | # 3 | # 補靪功能:將朙月拼音的詞庫修改爲朙月拼音擴充詞庫,可區分尖團及東庚等韻脣音字 4 | # 5 | # 作者:瑾昀 、雪齋 6 | # 7 | # 部署位置: 8 | # ~/.config/ibus/rime (Linux) 9 | # ~/Library/Rime (Mac OS) 10 | # %APPDATA%\Rime (Windows) 11 | # 12 | # 於重新部署後生效 13 | # 14 | # 注意:其他可與朙月拼音共用詞庫的方案(如雙拼方案、朙月拼音・簡化字方案)也可使用本擴充詞庫。只須將本custom.yaml的前面名字改爲對應的輸入方案名字然後放入用戶文件夾重新部署即可。如luna_pinyin_simp.custom.yaml 15 | # 16 | # 17 | 18 | patch: 19 | # 載入朙月拼音擴充詞庫 20 | "translator/dictionary": luna_pinyin_ziam_tuan.extended 21 | "translator/preedit_format": 22 | - xform/v/ü/ 23 | - xform/ii/ï/ 24 | # 兼容中州羅馬字 { 25 | #- "xform/([zcs]h?|r)y/$1ï/" 26 | # } 27 | "reverse_lookup/comment_format": 28 | - xform/v/ü/ 29 | - xform/ii/ï/ 30 | "speller/algebra": 31 | - "erase/^xx$/" 32 | # 設置模糊音 33 | - "derive/^([nl])ve$/$1ue/" 34 | - "derive/[zg]([iv])/j$1/" 35 | - "derive/[ck]([iv])/q$1/" 36 | - "derive/[sh]([iv])/x$1/" 37 | - "derive/^([jqxy])v/$1u/" 38 | - "derive/([zcs]h|r)ii$/$1i/" 39 | - "derive/m$/n/" 40 | - "derive/ia([mn])$/ie$1/" 41 | - "derive/([bpmfw])ong/$1eng/" 42 | - "derive/un$/uen/" 43 | - "derive/ui$/uei/" 44 | - "derive/iu$/iou/" 45 | # 兼容中州羅馬字 { 46 | #- "derive/^([nlzcs])ong$/$1iong/" 47 | #- "derive/^yong$/yvng/" 48 | #- "derive/iong$/vng/" 49 | #- "derive/^([jqx])iong$/$1ung/" 50 | #- "derive/ong$/ung/" 51 | #- "derive/^we([in])/wu$1/" 52 | #- "derive/ao$/au/" 53 | #- "derive/ve$/vo/" 54 | #- "derive/^([jqxy])ve$/$1uo/" 55 | #- "derive/([zcs]h?|r)ii$/$1y/" 56 | #- "derive/([zcs]h|r)u$/$1v/" 57 | #- "derive/([fw])ei$/$1i/" 58 | #- "derive/([nlw])ei$/$1ui/" 59 | # } 60 | # 糾錯 61 | - "derive/([aeiou])ng$/$1gn/" 62 | - "derive/([dtngkhrzcs])o(u|ng)$/$1o/" 63 | - "derive/ong$/on/" 64 | - "derive/ao$/oa/" 65 | - "derive/([iu])a([ou]|ng?)$/a$1$2/" 66 | # 簡拼 67 | - abbrev/^([a-z]).+$/$1/ 68 | - abbrev/^([zcs]h).+$/$1/ 69 | --------------------------------------------------------------------------------