├── AUTHORS ├── README.md ├── terra_pinyin_12345.schema.yaml ├── terra_pinyin.schema.yaml └── LICENSE /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | Gong Chen , Kunki Chiu : (LGPL) 3 | refined data from Chewing / 新酷音 (LGPL), 4 | opencc / 開放中文轉換 (Apache License version 2), 5 | Android Pinyin IME (Apache License version 2) and 6 | moedict.tw/萌典 (CC0 1.0) 7 | terra_pinyin*.yaml 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 地球拼音 2 | 3 | 配方: ℞ **terra-pinyin** 4 | 5 | [Rime](https://rime.im) 漢語拼音輸入方案 6 | 7 | 漢字讀音依照現代標準漢語,拼寫依照 [《漢語拼音方案》](https://zh.wikisource.org/wiki/%E6%B1%89%E8%AF%AD%E6%8B%BC%E9%9F%B3%E6%96%B9%E6%A1%88) 8 | 9 | 不同於對拼音作大量刪改的僞「全拼」輸入法,本方案與地球人所用「拼音」一致,故名「地球拼音」 10 | 11 | ## 用法 12 | 13 | 輸入四聲,用符號 `- / < \` 置於音節末尾。 14 | 15 | 爲按鍵便利,或以 `;` 代一聲,以 `,` 代三聲,以 `>` 代四聲。 16 | 17 | 按Control+ReturnShift+Return送出已編輯的拼音。 18 | 19 | 省略聲調或韻母時,於字詞旁顯示其完整拼音標註。 20 | 按Control+Shift+Return送出高亮選中字詞的的完整拼音。 21 | 22 | 注意:此拼音標註部分由程序自動生成,多音字註音恐有謬誤,只可視作輔助,不應引爲正音。 23 | 24 | ## 安裝 25 | 26 | [東風破](https://github.com/rime/plum) 安裝口令: `bash rime-install terra-pinyin` 27 | 28 | 授權條款:見 [LICENSE](LICENSE) 29 | -------------------------------------------------------------------------------- /terra_pinyin_12345.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | __include: terra_pinyin.schema:/ 5 | 6 | schema: 7 | schema_id: terra_pinyin_12345 8 | name: 地球拼音(數字標調) 9 | version: '0.20' 10 | author: 11 | - 佛振 12 | description: | 13 | 數字 12345 輸入聲調 14 | 用空格或 67890 選詞 15 | 16 | 猜成語專用: 17 | - 聲母韻母聲調任意組合 18 | - 不知道聲母輸入 ? 19 | - 不知道韻母不用輸入 20 | - 不知道聲調不用標調 21 | - 知道聲調寫數字 12345 22 | dependencies: 23 | - stroke 24 | 25 | menu: 26 | alternative_select_keys: 67890 27 | 28 | recognizer: 29 | 30 | speller: 31 | alphabet: 'zyxwvutsrqponmlkjihgfedcba?12345' 32 | initials: zyxwvutsrqponmlkjihgfedcba? 33 | algebra: 34 | - xform/^r5$/er5/ 35 | - abbrev/^(.+)([0-5])$/?$2/ 36 | - abbrev/^([bpmfdtnlgkhjqxryw]|[zcs]h?)(.+)([0-5])$/?$2$3/ 37 | - abbrev/^([bpmfdtnlgkhjqxrywaoe]|[zcs]h?)(.+)([0-5])$/$1$3/ 38 | - abbrev/^([a-z]).+$/$1/ 39 | - abbrev/^([zcs]h).+$/$1/ 40 | - derive/^([nl])ve/$1ue/ 41 | - derive/^([jqxy])u/$1v/ 42 | - derive/([dtnlgkhrzcs])un/$1uen/ 43 | - derive/ui/uei/ 44 | - derive/iu/iou/ 45 | - derive/ao/oa/ 46 | - derive/([aeiou])ng/$1gn/ 47 | - derive/([iu])a(o|ng?)/a$1$2/ 48 | - derive/^([a-z]+)[0-5]$/$1/ 49 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 50 | - derive/ong$/on/ 51 | 52 | translator: 53 | prism: terra_pinyin_12345 54 | -------------------------------------------------------------------------------- /terra_pinyin.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: terra_pinyin 6 | name: 地球拼音 7 | version: '0.30' 8 | author: 9 | - 佛振 10 | description: | 11 | 「漢語拼音」 12 | 用與聲調符號形似的 - / < \ 輸入四聲 13 | 也可用指法較便捷的 ; / , . 14 | 用 - = 鍵翻頁 15 | 拼音碼表根據 CC-CEDICT 改編 16 | dependencies: 17 | - stroke 18 | 19 | switches: 20 | - name: ascii_mode 21 | reset: 0 22 | states: [ 中文, 西文 ] 23 | - name: full_shape 24 | states: [ 半角, 全角 ] 25 | - name: simplification 26 | states: [ 漢字, 汉字 ] 27 | - name: ascii_punct 28 | states: [ 。,, ., ] 29 | 30 | engine: 31 | processors: 32 | - ascii_composer 33 | - recognizer 34 | - key_binder 35 | - speller 36 | - punctuator 37 | - selector 38 | - navigator 39 | - express_editor 40 | segmentors: 41 | - ascii_segmentor 42 | - matcher 43 | - abc_segmentor 44 | - punct_segmentor 45 | - fallback_segmentor 46 | translators: 47 | - punct_translator 48 | - table_translator@custom_phrase 49 | - reverse_lookup_translator 50 | - script_translator 51 | filters: 52 | - simplifier 53 | - uniquifier 54 | 55 | speller: 56 | alphabet: 'zyxwvutsrqponmlkjihgfedcba-;/<,\.' 57 | initials: zyxwvutsrqponmlkjihgfedcba 58 | finals: '-;/<,\.' 59 | delimiter: " '" 60 | algebra: 61 | - xform/^r5$/er5/ 62 | # 省略韻母和聲調 63 | - abbrev/^([a-z]).+$/$1/ 64 | - abbrev/^([zcs]h).+$/$1/ 65 | # 省略韻母 66 | - abbrev/^([a-z])(.+)([0-5])$/$1$3/ 67 | - abbrev/^([zcs]h)(.+)([0-5])$/$1$3/ 68 | - derive/^([nl])ve/$1ue/ 69 | - derive/^([jqxy])u/$1v/ 70 | - derive/([dtnlgkhrzcs])un/$1uen/ 71 | - derive/ui/uei/ 72 | - derive/iu/iou/ 73 | - derive/ao/oa/ 74 | - derive/([aeiou])ng/$1gn/ 75 | - derive/([iu])a(o|ng?)/a$1$2/ 76 | # 省略聲調 77 | - derive/^([a-z]+)[0-5]$/$1/ 78 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 79 | - derive/ong$/on/ 80 | - 'erase/^.*5$/' 81 | # 符號標調 82 | - 'xlit 1234 -/<\' 83 | - 'derive/^(.*)-$/$1;/' 84 | - 'derive/^(.*)<$/$1,/' 85 | - 'derive/^(.*)\\$/$1./' 86 | 87 | translator: 88 | dictionary: terra_pinyin 89 | spelling_hints: 5 # ~字以內候選標註完整帶調拼音 90 | preedit_format: 91 | - xform/([nl])v/$1ü/ 92 | - xform/([nl])ue/$1üe/ 93 | - xform/([nl])üen/$1uen/ 94 | - xform/([jqxy])v/$1u/ 95 | - xform/eh/ê/ 96 | - 'xform [-;] ˉ' 97 | - 'xform / ˊ' 98 | - 'xform [<,] ˇ' 99 | - 'xform [\\.] ˋ' 100 | - 'xform ([aeiou])(ng?|r)(ˉ|ˊ|ˇ|ˋ) $1$3$2' 101 | - 'xform ([aeo])([iuo])(ˉ|ˊ|ˇ|ˋ) $1$3$2' 102 | - 'xform aˉ ā' 103 | - 'xform aˊ á' 104 | - 'xform aˇ ǎ' 105 | - 'xform aˋ à' 106 | - 'xform eˉ ē' 107 | - 'xform eˊ é' 108 | - 'xform eˇ ě' 109 | - 'xform eˋ è' 110 | - 'xform oˉ ō' 111 | - 'xform oˊ ó' 112 | - 'xform oˇ ǒ' 113 | - 'xform oˋ ò' 114 | - 'xform iˉ ī' 115 | - 'xform iˊ í' 116 | - 'xform iˇ ǐ' 117 | - 'xform iˋ ì' 118 | - 'xform uˉ ū' 119 | - 'xform uˊ ú' 120 | - 'xform uˇ ǔ' 121 | - 'xform uˋ ù' 122 | - 'xform üˉ ǖ' 123 | - 'xform üˊ ǘ' 124 | - 'xform üˇ ǚ' 125 | - 'xform üˋ ǜ' 126 | comment_format: 127 | - xform ([aeiou])(ng?|r)([1234]) $1$3$2 128 | - xform ([aeo])([iuo])([1234]) $1$3$2 129 | - xform a1 ā 130 | - xform a2 á 131 | - xform a3 ǎ 132 | - xform a4 à 133 | - xform e1 ē 134 | - xform e2 é 135 | - xform e3 ě 136 | - xform e4 è 137 | - xform o1 ō 138 | - xform o2 ó 139 | - xform o3 ǒ 140 | - xform o4 ò 141 | - xform i1 ī 142 | - xform i2 í 143 | - xform i3 ǐ 144 | - xform i4 ì 145 | - xform u1 ū 146 | - xform u2 ú 147 | - xform u3 ǔ 148 | - xform u4 ù 149 | - xform v1 ǖ 150 | - xform v2 ǘ 151 | - xform v3 ǚ 152 | - xform v4 ǜ 153 | - xform/([nljqxy])v/$1ü/ 154 | - xform/eh[0-5]?/ê/ 155 | - xform/([a-z]+)[0-5]/$1/ 156 | 157 | custom_phrase: 158 | dictionary: "" 159 | user_dict: custom_phrase 160 | db_class: stabledb 161 | enable_completion: false 162 | enable_sentence: false 163 | initial_quality: 1 164 | 165 | reverse_lookup: 166 | dictionary: stroke 167 | enable_completion: true 168 | prefix: "`" 169 | suffix: "'" 170 | tips: 〔筆畫〕 171 | preedit_format: 172 | - xlit/hspnz/一丨丿丶乙/ 173 | comment_format: 174 | - xform ([aeiou])(ng?|r)([1234]) $1$3$2 175 | - xform ([aeo])([iuo])([1234]) $1$3$2 176 | - xform a1 ā 177 | - xform a2 á 178 | - xform a3 ǎ 179 | - xform a4 à 180 | - xform e1 ē 181 | - xform e2 é 182 | - xform e3 ě 183 | - xform e4 è 184 | - xform o1 ō 185 | - xform o2 ó 186 | - xform o3 ǒ 187 | - xform o4 ò 188 | - xform i1 ī 189 | - xform i2 í 190 | - xform i3 ǐ 191 | - xform i4 ì 192 | - xform u1 ū 193 | - xform u2 ú 194 | - xform u3 ǔ 195 | - xform u4 ù 196 | - xform v1 ǖ 197 | - xform v2 ǘ 198 | - xform v3 ǚ 199 | - xform v4 ǜ 200 | - xform/([nljqxy])v/$1ü/ 201 | - xform/eh[0-5]?/ê/ 202 | - xform/([a-z]+)[0-5]/$1/ 203 | 204 | punctuator: 205 | import_preset: default 206 | 207 | key_binder: 208 | import_preset: default 209 | bindings: 210 | - { when: has_menu, accept: minus, send: minus } # - 輸入第一聲 211 | - { when: paging, accept: minus, send: Page_Up } # 可用作向前翻頁 212 | - { when: has_menu, accept: period, send: period } # . 輸入第四聲 213 | - { when: paging, accept: period, send: Page_Down } # 不可開始向後翻頁 214 | 215 | recognizer: 216 | patterns: 217 | reverse_lookup: "`[a-z]*'?$" 218 | uppercase: "[A-Z][-_+.'0-9A-Za-z]*$" 219 | 220 | __patch: 221 | # 使用八股文語言模型 222 | - grammar:/hant? 223 | # 用家自選配置 224 | - terra_pinyin.custom:/patch? 225 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | --------------------------------------------------------------------------------