First release.

This commit is contained in:
liding 2024-03-10 19:36:24 +08:00
commit 0fad2de35c
27 changed files with 1666835 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
build/
installation.yaml
user.yaml
default.custom.yaml
weasel.custom.yaml

54
README.md Normal file
View File

@ -0,0 +1,54 @@
关于本方案的更多介绍请查看 [关于 Rime 输入法的思考](https://note.lishouzhong.com/article/wiki/Rime%20%E8%BE%93%E5%85%A5%E6%B3%95.html) 。
**由于五笔 86 方案中包含私有码表 (Win10 1809 内置的 86 五笔码表),故此配置仅用于个人学习与交流。**
## 配置说明
所有方案默认不开启用户造词词库功能,有需要的用户需请自行开启。
## 五笔方案
五笔输入法使用 86 版,词库主体采用大单字库 + 小词库的方案。
Rime 官方的 86 五笔词库 [rime-wubi](https://github.com/rime/rime-wubi) 来源于 [acevery/ibus-table-wubi](https://github.com/acevery/ibus-table-wubi/blob/master/tables/wubi86.txt) 项目 ,但由于上游词库的码表里有很多错误的编码,直到 2015 年才被 Rime 用户发现并被 Rime 官方修复,[详情见此](https://github.com/rime/brise/issues/90#issuecomment-110983278)。针对错误编码的补丁只存在于 Rime 官方的 rime-wubi 词库中,没有被反馈给上游的 ibus-table-wubi。这个词库错误较多缺少维护故不考虑使用。
另一个没有版权问题的词库是窝子 (Wozy) 创建的极爽词库,窝子在 2020 年将极爽五笔词库授权给了 Rime 官方使用,[详情见此](https://github.com/rime/rime-wubi/pull/3#issuecomment-577035306)。但是极爽词库已经很久没有维护过了,因此极爽词库中的码表所包含的汉字也并不全面,只有 11589 个,在输入古汉语时经常找不到字。
目前可以找到的比较完整的码表是 Windows 10 操作系统自带的微软五笔的码表,共计 31900 个字。微软(中国)有限公司也是 [GB 18030-2022](https://std.samr.gov.cn/gb/search/gbDetailed?id=E4A2A4C875726A5DE05397BE0A0A61E8) 的起草单位,自家产品应该会遵循自家标准。所以本方案的五笔方案部分将使用此码表。
但微软五笔码表一共有 534114 个词条,去除单字后还有 502214 个词条,不符合小词库的要求。又考虑到,虽然极爽词库收录的单字并不全面,但它的常用词词库已经非常成熟,所以把极爽词库中的单字部分去除保留词组部分可以直接得到一个小体积的词库。
所以最终词库码表的组成是: 微软五笔的单字码表 + 极爽词库的多字词码表。
有两个可以选择的词库,一个是让极点五笔成名的极爽 4.3 词库,另一个是从极爽 4.3 改进来的极爽 6.0 词库。考虑到极爽 4.3 比 6.0 出名得多,所以决定使用极爽 4.3 作为小词库的来源。极爽 4.3 词库中共有 88543 个词条,其中包含 61432 个词组,符合小词库的要求。
最终,五笔方案的词库构成为:
- 词库主体:
- 微软五笔词库的单字码表
- 极爽 4.3 词库的多字词码表
- 其他词库:
- [KyleBing/rime-wubi86-jidian](https://github.com/KyleBing/rime-wubi86-jidian) 中取行政区划词库码表
- 用户私有词库码表
## 拼音方案
本方案的拼音输入法使用双拼 (自然码) 和全拼两种方案,可以自行切换。
双拼输入法在解析时会被映射到全拼上面,所以双拼输入法没有自己的词库。
最终,全拼词库的构成为:
- 词库主体:
- Rime 官方的袖珍简化字 [rime-pinyin-simp](https://github.com/rime/rime-pinyin-simp) 方案的词库 (上游词库为安卓开源项目)
- 维基百科中文词条库 <https://github.com/felixonmars/fcitx5-pinyin-zhwiki>
- 其他词库:
- 用户私有词库
## 其他方案
英文输入法来源于 easy_en 项目,作者为 [Patricivs](https://github.com/Patricivs)。
笔画输入法来源于 Rime 官方的 [rime-stroke](https://github.com/rime/rime-stroke) 方案,主要用于反查。
中文数字输入法根据 Rime 官方教程 *数字之道* 修改而来。

62
default.yaml Normal file
View File

@ -0,0 +1,62 @@
# Rime default settings
# encoding: utf-8
# customized from Rime default.yaml v0.40
config_version: '0.40'
schema_list:
- schema: wubi_86
- schema: pinyin_zrm
- schema: pinyin
- schema: easy_en
- schema: zh_numbers
- schema: stroke
switcher:
caption: (方案选单)
hotkeys:
- Control+grave
save_options:
- ascii_mode
- full_shape
- ascii_punct
- zh_trad
fold_options: true
abbreviate_options: true
option_list_separator: '/'
menu:
page_size: 5
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
key_binder:
bindings:
__patch:
- key_bindings:/emacs_editing
- key_bindings:/move_by_word_with_tab
- key_bindings:/paging_with_minus_equal
- key_bindings:/paging_with_comma_period
- key_bindings:/numbered_mode_switch
- key_bindings:/quick_selection
- key_bindings:/quick_switch_for_vim
recognizer:
patterns:
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$"
ascii_composer:
good_old_caps_lock: true
switch_key:
Shift_L: inline_ascii
Shift_R: commit_text
Control_L: noop
Control_R: noop
Caps_Lock: clear
Eisu_toggle: clear

108982
easy_en.dict.yaml Normal file

File diff suppressed because it is too large Load Diff

74
easy_en.schema.yaml Normal file
View File

@ -0,0 +1,74 @@
# encoding: utf-8
# Rime schema settings
#
# Changelog
#
# 2024-02-25 Li Ding <ld.sino@outlook.com>
# - add lua translator date_time_translator
#
schema:
schema_id: easy_en
name: Easy English
version: "0.2"
author:
- Patrick <ipatrickmac@gmail.com>
description:
Easy English
switches:
- name: ascii_mode
reset: 0
states: [ On, Off ]
engine:
processors:
- ascii_composer
- key_binder
- speller
- recognizer
- punctuator
- selector
- navigator
- express_editor
segmentors:
- matcher
- ascii_segmentor
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- table_translator
- punct_translator
- lua_translator@date_time_translator
filters:
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA-_
delimiter: " '"
translator:
dictionary: easy_en # search on <dictionary>.dict.yaml file
enable_charset_filter: true # 使用字符集过滤
encode_commit_history: false # 对已上屏的词自动成词
enable_encoder: false # 使用自动造词,允许新词进入用户词典
enable_sentence: false # 使用自动造句
enable_user_dict: false # 是否生成 .userdb 用户词典。用户词典记录动态字词频,用户词。
spelling_hints: 9
key_binder:
import_preset: default
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
symbols:
__include: symbols:/symbols
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]+[a-z]*|[a-z]+)$" # symbol 用的

6
fcitx5.yaml Normal file
View File

@ -0,0 +1,6 @@
# Fcitx5 settings
# encoding: utf-8
config_version: "0.22"
app_options: {}

74
key_bindings.yaml Normal file
View File

@ -0,0 +1,74 @@
# Rime key bindings
# encoding: utf-8
emacs_editing:
__append:
- { when: composing, accept: Control+p, send: Up }
- { when: composing, accept: Control+n, send: Down }
- { when: composing, accept: Control+b, send: Left }
- { when: composing, accept: Control+f, send: Right }
- { when: composing, accept: Control+a, send: Home }
- { when: composing, accept: Control+e, send: End }
- { when: composing, accept: Control+d, send: Delete }
- { when: composing, accept: Control+k, send: Shift+Delete }
- { when: composing, accept: Control+h, send: BackSpace }
- { when: composing, accept: Control+g, send: Escape }
- { when: composing, accept: Control+bracketleft, send: Escape }
- { when: composing, accept: Control+y, send: Page_Up }
- { when: composing, accept: Alt+v, send: Page_Up }
- { when: composing, accept: Control+v, send: Page_Down }
move_by_word_with_tab:
__append:
- { when: composing, accept: ISO_Left_Tab, send: Shift+Left }
- { when: composing, accept: Shift+Tab, send: Shift+Left }
- { when: composing, accept: Tab, send: Shift+Right }
paging_with_minus_equal:
__append:
- { when: has_menu, accept: minus, send: Page_Up }
- { when: has_menu, accept: equal, send: Page_Down }
paging_with_comma_period:
__append:
- { when: paging, accept: comma, send: Page_Up }
- { when: has_menu, accept: period, send: Page_Down }
numbered_mode_switch:
__append:
- { when: always, accept: Control+Shift+1, select: .next }
- { when: always, accept: Control+Shift+2, toggle: ascii_mode }
- { when: always, accept: Control+Shift+3, toggle: full_shape }
- { when: always, accept: Control+Shift+4, toggle: simplification }
- { when: always, accept: Control+Shift+5, toggle: extended_charset }
- { when: always, accept: Control+Shift+exclam, select: .next }
- { when: always, accept: Control+Shift+at, toggle: ascii_mode }
- { when: always, accept: Control+Shift+numbersign, toggle: full_shape }
- { when: always, accept: Control+Shift+dollar, toggle: simplification }
- { when: always, accept: Control+Shift+percent, toggle: extended_charset }
quick_selection:
__append:
- { when: has_menu, accept: semicolon, send: 2 }
- { when: has_menu, accept: apostrophe, send: 3 }
- { when: paging, accept: bracketleft, send: 4 }
- { when: has_menu, accept: bracketright, send: 5 }
- { when: has_menu, accept: backslash, send: Escape}
quick_switch_for_vim:
__append:
- { when: always, accept: Release+Escape, toggle: ascii_mode}
windows_compatible_mode_switch:
__append:
- { when: always, accept: Shift+space, toggle: full_shape }
- { when: always, accept: Control+period, toggle: ascii_punct }
optimized_mode_switch:
__append:
- { when: always, accept: Control+Shift+space, select: .next }
- { when: always, accept: Shift+space, toggle: ascii_mode }
- { when: always, accept: Control+comma, toggle: full_shape }
- { when: always, accept: Control+period, toggle: ascii_punct }
- { when: always, accept: Control+slash, toggle: simplification }
- { when: always, accept: Control+backslash, toggle: extended_charset }

View File

@ -0,0 +1,29 @@
local function date_time_translator(input, seg)
if (input == "/dd") then
--- Candidate(type, start, end, text, comment)
yield(Candidate("date", seg.start, seg._end, os.date("%m月%d日"), ""))
yield(Candidate("date", seg.start, seg._end, os.date("%Y年%m月%d日"), ""))
yield(Candidate("date", seg.start, seg._end, os.date("%m-%d"), ""))
yield(Candidate("date", seg.start, seg._end, os.date("%Y-%m-%d"), ""))
yield(Candidate("date", seg.start, seg._end, os.date("%Y/%m/%d"), ""))
end
if (input == "/tt") then
yield(Candidate("time", seg.start, seg._end, os.date("%H:%M"), ""))
yield(Candidate("time", seg.start, seg._end, os.date("%H:%M:%S"), ""))
end
if (input == "/ww") then
local weakTabZh = {'', '', '', '', '', '', ''}
local weakTabEnSimp = {'Sun', 'Mon', 'Thues', 'Wed', 'Thur', 'Fri', 'Sat'}
local weakTabEnFull = {'Sunday', 'Monday', 'Thuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'}
yield(Candidate("week", seg.start, seg._end, ""..weakTabZh[tonumber(os.date("%w")+1)], ""))
yield(Candidate("week", seg.start, seg._end, "星期"..weakTabZh[tonumber(os.date("%w")+1)], ""))
yield(Candidate("week", seg.start, seg._end, weakTabEnSimp[tonumber(os.date("%w")+1)], ""))
yield(Candidate("week", seg.start, seg._end, weakTabEnFull[tonumber(os.date("%w")+1)], ""))
end
if (input == "/mm") then
yield(Candidate("month", seg.start, seg._end, os.date("%B"), ""))
yield(Candidate("month", seg.start, seg._end, os.date("%b"), "缩写"))
end
end
return date_time_translator

24
pinyin.dict.yaml Normal file
View File

@ -0,0 +1,24 @@
# encoding: utf-8
# Rime dictionary
#
# Original table author
# Li Ding <ld.sino@outlook.com>
#
# Changelog
#
# 2022-09-14 Li Ding <ld.sino@outlook.com>
# - add pinyin_open_source_proj.dict.yaml as dict
# - add pinyin.zhwiki20220722.dict.yaml as dict
#
# 2024-02-25 Li Ding <ld.sino@outlook.com>
# - add pinyin_user.dict.yaml as user dict
# - reorganize dict structure
---
name: pinyin
version: "0.1"
import_tables:
- pinyin_open_source_proj
- pinyin.zhwiki20220722
- pinyin_user
...

125
pinyin.schema.yaml Normal file
View File

@ -0,0 +1,125 @@
# encoding: utf-8
# Rime schema settings
#
# Original schema author
# Li Ding <ld.sino@outlook.com>
#
# Changelog
#
schema:
schema_id: pinyin
name: "全拼"
version: "2024.02.25"
author:
- Li Ding <ld.sino@outlook.com>
description: |
词库来源于安卓拼音与 fcitx5-pinyin-zhwiki 项目。
dependencies:
- stroke # 反查
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: ascii_punct
reset: 0
states: [ 。,, ]
- name: zh_trad
reset: 0
states: [ 简体, 繁体 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- reverse_lookup_translator
- table_translator
- lua_translator@date_time_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- abbrev/^([a-z]).+$/$1/
- abbrev/^([zcs]h).+$/$1/
- derive/^([nl])ue$/$1ve/
- derive/^([jqxy])u/$1v/
- derive/un$/uen/
- derive/ui$/uei/
- derive/iu$/iou/
- derive/([aeiou])ng$/$1gn/
- derive/([dtngkhrzcs])o(u|ng)$/$1o/
- derive/ong$/on/
- derive/ao$/oa/
- derive/([iu])a(o|ng?)$/a$1$2/
translator:
dictionary: pinyin # search on <dictionary>.dict.yaml file
enable_charset_filter: true # 使用字符集过滤
encode_commit_history: false # 对已上屏的词自动成词
enable_encoder: false # 使用自动造词,允许新词进入用户词典
enable_sentence: false # 使用自动造句
enable_user_dict: false # 是否生成 .userdb 用户词典。用户词典记录动态字词频,用户词。
# max_phrase_length: 4 # 最大自动成词的词长,开启用户词典后生效
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`"
suffix: "'"
tips: 〔笔画〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- xform/([nl])v/$1ü/
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
symbols:
__include: symbols:/symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]+[a-z]*|[a-z]+)$" # symbol 用的
reverse_lookup: "`[a-z]*'?$" # 笔画反查用的
simplifier:
# 简入繁出,由 opencc 简繁转换库实现
option_name: zh_trad
opencc_config: s2t.json
# opencc_config: t2s.json # 繁 -> 简【默认】
# opencc_config: t2tw.json # 繁 -> 台湾
# opencc_config: t2hk.json # 繁 -> 香港

1279584
pinyin.zhwiki20220722.dict.yaml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

31
pinyin_user.dict.yaml Normal file
View File

@ -0,0 +1,31 @@
# encoding: utf-8
# Rime dictionary
---
name: pinyin_user
version: "2024.02.25"
sort: original
columns:
- text
- code
- weight
...
Rime rime 7
中州韵 rime 6
https://rime.im/ rime 5
小狼毫 rime 4
weasel rime 3
鼠须管 rime 2
squirrel rime 1
git git 1
github.com github 2
github github 1
lishouzhong.com lsz 3
lishouzhong lsz 2
李守中 lsz 1
李鼎 liding 999999

174
pinyin_zrm.schema.yaml Normal file
View File

@ -0,0 +1,174 @@
# encoding: utf-8
# Rime schema settings
#
# Original schema author
# Li Ding <ld.sino@outlook.com>
#
# Changelog
#
schema:
schema_id: pinyin_zrm
name: 双拼_自然码
version: "2024.02.25"
author:
- Li Ding <ld.sino@outlook.com>
description: |
双拼自然码方案映射到全拼,无形码。
dependencies:
- stroke # 反查
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: ascii_punct
reset: 0
states: [ 。,, ]
- name: zh_trad
reset: 0
states: [ 简体, 繁体 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- table_translator
- script_translator
- lua_translator@date_time_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^xx$/
- derive/^([jqxy])u$/$1v/
- derive/^([aoe])([ioun])$/$1$1$2/
- xform/^([aoe])(ng)?$/$1$1$2/
- xform/iu$/Q/
- xform/[iu]a$/W/
- xform/[uv]an$/R/
- xform/[uv]e$/T/
- xform/ing$|uai$/Y/
- xform/^sh/U/
- xform/^ch/I/
- xform/^zh/V/
- xform/uo$/O/
- xform/[uv]n$/P/
- xform/i?ong$/S/
- xform/[iu]ang$/D/
- xform/(.)en$/$1F/
- xform/(.)eng$/$1G/
- xform/(.)ang$/$1H/
- xform/ian$/M/
- xform/(.)an$/$1J/
- xform/iao$/C/
- xform/(.)ao$/$1K/
- xform/(.)ai$/$1L/
- xform/(.)ei$/$1Z/
- xform/ie$/X/
- xform/ui$/V/
- xform/(.)ou$/$1B/
- xform/in$/N/
- xlit/QWRTYUIOPSDFGHMJCKLZXVBN/qwrtyuiopsdfghmjcklzxvbn/
#- abbrev/^(.).+$/$1/
translator:
dictionary: pinyin # search on <dictionary>.dict.yaml file
prism: pinyin_zrm # 此翻译器生成的 prism 文件的文件名,避免和其他方案的 prism 文件重名
enable_charset_filter: true # 使用字符集过滤
encode_commit_history: false # 对已上屏的词自动成词
enable_encoder: false # 使用自动造词,允许新词进入用户词典
enable_sentence: false # 使用自动造句
enable_user_dict: false # 是否生成 .userdb 用户词典。用户词典记录动态字词频,用户词。
# max_phrase_length: 4 # 最大自动成词的词长,开启用户词典后生效
preedit_format:
- xform/([bpmnljqxy])n/$1in/
- xform/(\w)g/$1eng/
- xform/(\w)q/$1iu/
- xform/([gkhvuirzcs])w/$1ua/
- xform/(\w)w/$1ia/
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
- xform/(\w)t/$1ve/
- xform/([gkhvuirzcs])y/$1uai/
- xform/(\w)y/$1ing/
- xform/([dtnlgkhvuirzcs])o/$1uo/
- xform/(\w)p/$1un/
- xform/([jqx])s/$1iong/
- xform/(\w)s/$1ong/
- xform/([jqxnl])d/$1iang/
- xform/(\w)d/$1uang/
- xform/(\w)f/$1en/
- xform/(\w)h/$1ang/
- xform/(\w)j/$1an/
- xform/(\w)k/$1ao/
- xform/(\w)l/$1ai/
- xform/(\w)z/$1ei/
- xform/(\w)x/$1ie/
- xform/(\w)c/$1iao/
- xform/([dtgkhvuirzcs])v/$1ui/
- xform/(\w)b/$1ou/
- xform/(\w)m/$1ian/
- xform/([aoe])\1(\w)/$1$2/
- "xform/(^|[ '])v/$1zh/"
- "xform/(^|[ '])i/$1ch/"
- "xform/(^|[ '])u/$1sh/"
- xform/([jqxy])v/$1u/
- xform/([nl])v/$1ü/
reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`"
suffix: "'"
tips: (笔画)
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- xform/([nl])v/$1ü/
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
symbols:
__include: symbols:/symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]+[a-z]*|[a-z]+)$" # symbol 用的
reverse_lookup: "`[a-z]*'?$" # 笔画反查用的
simplifier:
# 简入繁出,由 opencc 简繁转换库实现
option_name: zh_trad
opencc_config: s2t.json
# opencc_config: t2s.json # 繁 -> 简【默认】
# opencc_config: t2tw.json # 繁 -> 台湾
# opencc_config: t2hk.json # 繁 -> 香港

71
punctuation.yaml Normal file
View File

@ -0,0 +1,71 @@
# Rime's punctuation and symbols
# encoding: utf-8
full_shape:
' ' : { commit: ' ' }
',' : { commit: }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ]
'>' : [ 》, 〉, », ]
'/' : [ ]
'?' : { commit: }
';' : { commit: }
':' : { commit: }
'''' : { pair: [ '', '' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, ]
'|' : [ ・, ]
'`' : { commit: '`' }
'~' : [ , ˜ ]
'!' : { commit: }
'@' : { commit: }
'#' : { commit: }
'%' : { commit: }
'$' : { commit: '$' }
'^' : { commit: …… }
'&' : { commit: }
'*' : { commit: }
'(' : { commit: }
')' : { commit: }
'-' : { commit: }
'_' : { commit: —— }
'+' : { commit: }
'=' : { commit: }
'[' : [ 「, 【, , ]
']' : [ 」, 】, , ]
'{' : [ 『, 〖, ]
'}' : [ 』, 〗, ]
half_shape:
',' : { commit: }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ]
'>' : [ 》, 〉, », ]
'/' : [ '/' ]
'?' : { commit: }
';' : { commit: }
':' : { commit: }
'''' : { pair: [ '', '' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, '\' ]
'|' : [ '|', · ]
'`' : { commit: '`' }
'~' : { commit: '~' }
'!' : { commit: }
'@' : { commit: '@' }
'#' : { commit: '#' }
'%' : { commit: '%' }
'$' : { commit: '$' }
'^' : { commit: …… }
'&' : { commit: '&' }
'*' : [ '*', · ]
'(' : [ ]
')' : [ ]
'-' : { commit: '-' }
'_' : { commit: —— }
'+' : { commit: '+' }
'=' : { commit: '=' }
'[' : [ 「, 【, , ]
']' : [ 」, 】, , ]
'{' : [ 『, 〖, ]
'}' : [ 』, 〗, ]

2
rime.lua Normal file
View File

@ -0,0 +1,2 @@
-- input date time
date_time_translator = require("date_time_translator")

114977
stroke.dict.yaml Normal file

File diff suppressed because it is too large Load Diff

111
stroke.schema.yaml Normal file
View File

@ -0,0 +1,111 @@
# encoding: utf-8
# Rime schema settings
#
# Original schema author
# Rime 五筆畫 v0.5 作者: 四季的風 雪齋 Kunki Chou
#
# Changelog
# 2022-09-14 Li Ding <ld.sino@outlook.com>
# - turn off word creation related functions and dynamic user dict
#
schema:
schema_id: stroke
name: "笔画"
version: "2022-09-14"
author:
- 四季的風
- 雪齋
- Kunki Chou
- Li Ding <ld.sino@outlook.com>
description: |
笔画
h,s,p,n,z 代表横、竖、撇、捺、折
由 Rime 五筆畫 v0.5 修改而来
dependencies:
- pinyin
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: ascii_punct
reset: 0
states: [ 。,, ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- table_translator
speller:
alphabet: "abcdefghijklmnopqrstuvwxyz"
delimiter: " '"
menu:
page_size: 9
translator:
dictionary: stroke # search on <dictionary>.dict.yaml file
enable_charset_filter: true # 使用字符集过滤
encode_commit_history: false # 对已上屏的词自动成词
enable_encoder: false # 使用自动造词,允许新词进入用户词典
enable_sentence: false # 使用自动造句
enable_user_dict: false # 是否生成 .userdb 用户词典。用户词典记录动态字词频,用户词。
# max_phrase_length: 4 # 最大自动成词的词长,开启用户词典后生效
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- xform/~//
- xlit/hspnz/一丨丿丶乙/
abc_segmentor:
extra_tags:
- reverse_lookup
reverse_lookup:
dictionary: pinyin
prefix: "`"
suffix: "'"
tips: 〔拼音〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
comment_format:
- xlit/hspnz/一丨丿丶乙/
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
symbols:
__include: symbols:/symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"

16
symbols.yaml Normal file
View File

@ -0,0 +1,16 @@
# Rime's punctuation and symbols
# encoding: utf-8
symbols:
"/r": [ " -> " ]
"/l": [ " <- " ]
# 八卦、八卦名
'/bg': [ ☰, ☱, ☲, ☳, ☴, ☵, ☶, ☷ ]
'/bgm': [ 乾, 兌, 離, 震, 巽, 坎, 艮, 坤 ]
# 罗马数字
'/lm': [ , ⅱ, ⅲ, ⅳ, , ⅵ, ⅶ, ⅷ, ⅸ, , ⅺ, ⅻ, , , , ⅿ ]
'/lmu': [ , Ⅱ, Ⅲ, Ⅳ, , Ⅵ, Ⅶ, Ⅷ, Ⅸ, , Ⅺ, Ⅻ, , , , ]
# 天干、地支、干支
'/tg': [ 甲, 乙, 丙, 丁, 戊, 己, 庚, 辛, 壬, 癸 ]
'/dz': [ 子, 丑, 寅, 卯, 辰, 巳, 午, 未, 申, 酉, 戌, 亥 ]
'/gz': [ 甲子, 乙丑, 丙寅, 丁卯, 戊辰, 己巳, 庚午, 辛未, 壬申, 癸酉, 甲戌, 乙亥, 丙子, 丁丑, 戊寅, 己卯, 庚辰, 辛巳, 壬午, 癸未, 甲申, 乙酉, 丙戌, 丁亥, 戊子, 己丑, 庚寅, 辛卯, 壬辰, 癸巳, 甲午, 乙未, 丙申, 丁酉, 戊戌, 己亥, 庚子, 辛丑, 壬寅, 癸卯, 甲辰, 乙巳, 丙午, 丁未, 戊申, 己酉, 庚戌, 辛亥, 壬子, 癸丑, 甲寅, 乙卯, 丙辰, 丁巳, 戊午, 己未, 庚申, 辛酉, 壬戌, 癸亥 ]

73
weasel.yaml Normal file
View File

@ -0,0 +1,73 @@
# Weasel settings
# encoding: utf-8
config_version: "0.22"
app_options:
cmd.exe:
ascii_mode: true
conhost.exe:
ascii_mode: true
style:
color_scheme: cool_breeze
font_face: "Microsoft YaHei"
font_point: 14
label_font_point: 11
label_format: "%s."
mark_text: ""
# horizontal: true # 横向排列候选
inline_preedit: true # 隐藏打字栏
fullscreen: false
preedit_type: composition
display_tray_icon: false # 显示托盘图标
vertical_auto_reverse: false
vertical_text: false
vertical_text_left_to_right: false
vertical_text_with_wrap: false
layout:
enhanced_position: true # 获取光标位置失败后在窗口左上角绘制输入框
align_type: center
max_width: 0
min_width: 0
min_height: 0
max_height: 0
border_width: 1 # 边框宽度
margin_x: 8 # 候选字左右边距
margin_y: 8 # 候选字上下边距
candidate_spacing: 8 # 候选字间隔,小于等于 margin 时,其值等于 margin 的值
hilite_spacing: 2 # 标签和候选字的间隔
hilite_padding: 4 # 候选字背景色块的额外高度
spacing: 10 # 打字栏与候选栏的间距
corner_radius: 2 # 候选栏圆角幅度
# hilited_corner_radius: 2 # 候选字背景色块圆角幅度
round_corner: 2 # 是 hilited_corner_radius 的别名
shadow_radius: 0
shadow_offset_x: 4
shadow_offset_y: 4
preset_color_schemes:
tantsing:
name: "丹青Tantsing"
author: Mijiag
text_color: 0x000000
back_color: 0xE3E3E3
border_color: 0x000000
candidate_text_color: 0x000000
comment_text_color: 0x474747
hilited_back_color: 0x1A0791
hilited_candidate_back_color: 0x6F0B73
hilited_candidate_text_color: 0xE3E3E3
hilited_text_color: 0xE3E3E3
cool_breeze:
name: "清風Cool Breeze"
author: "skoj <skoj@qq.com>"
text_color: 0x0000FF
back_color: 0xFFFBFB
border_color: 0xFFAAAA
hilited_text_color: 0x0000CE
hilited_back_color: 0xFFFBFB
candidate_text_color: 0x009100
hilited_candidate_text_color: 0x6F003A
hilited_candidate_back_color: 0xFFD6AC

37
wubi_86.dict.yaml Normal file
View File

@ -0,0 +1,37 @@
# encoding: utf-8
# Rime dictionary
#
# Original table author
# Li Ding <ld.sino@outlook.com>
#
# Changelog
#
# 2022-09-14 Li Ding <ld.sino@outlook.com>
# - export MS wubi_86 code table with wubi-lex, only keep single words
#
# 2024.02.25 Li Ding <ld.sino@outlook.com>
# - add phrases from jishuang 4.3
# - reorganize dict structure
#
---
name: wubi_86
version: "2024.02.25"
import_tables:
- wubi_86_win10_single
- wubi_86_jishuang_phrase
- wubi_86_district
- wubi_86_user
encoder:
# 以 z 开头的输入不走这个码表 ( 走拼音反查 )
exclude_patterns:
- '^z.*$'
# rules 部分对于单字输入没什么用
# rules:
# - length_equal: 2 # 对于 2 字词
# formula: "AaAbBaBb" # 取第一字首尾码、第二字首尾碼
# - length_equal: 3 # 对于 3 字词
# formula: "AaBaCaCb" # 取第一字首尾码、第三字首尾碼
# - length_in_range: [4, 10] # 对于 4 - 10 个字的词
# formula: "AaBaCaZa" # 取第一字首码、第二字首码、第三字首码、最后一字首码
...

110
wubi_86.schema.yaml Normal file
View File

@ -0,0 +1,110 @@
# encoding: utf-8
# Rime schema settings
#
# Changelog
#
schema:
schema_id: wubi_86
name: "五笔_86"
version: "2024.02.25"
author:
- Li Ding <ld.sino@outlook.com>
description: |
五笔86版
王永民先生发明
码表源自微软五笔 (Win10 21H2) 去除词组的部分
敲 z 键进入拼音反查
dependencies:
- pinyin # 反查
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: ascii_punct
reset: 0
states: [ 。,, ]
- name: zh_trad
reset: 0
states: [ 简体, 繁体 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- table_translator
- lua_translator@date_time_translator
filters:
- simplifier
- uniquifier
speller:
delimiter: " ;'"
# auto_select: true
max_code_length: 4
translator:
dictionary: wubi_86 # search on <dictionary>.dict.yaml file
enable_charset_filter: true # 使用字符集过滤
encode_commit_history: false # 对已上屏的词自动成词
enable_encoder: false # 使用自动造词,允许新词进入用户词典
enable_sentence: false # 使用自动造句
enable_user_dict: false # 是否生成 .userdb 用户词典。用户词典记录动态字词频,用户词。
# max_phrase_length: 4 # 最大自动成词的词长,开启用户词典后生效
disable_user_dict_for_patterns:
- "^z.*$"
reverse_lookup:
dictionary: pinyin
# prism: pinyin_zrm # 全拼反查。取消注释,反查模式为双拼反查。
prefix: "z"
suffix: "'"
tips: 〔拼音〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape
symbols:
__include: symbols:/symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: '^/([0-9]0?|[A-Za-z]+)$' # symbol 用的
reverse_lookup: "^z[a-z]*'?$" # 笔画反查用的
simplifier:
# 简入繁出,由 opencc 简繁转换库实现
option_name: zh_trad
opencc_config: s2t.json
# opencc_config: t2s.json # 繁 -> 简【默认】
# opencc_config: t2tw.json # 繁 -> 台湾
# opencc_config: t2hk.json # 繁 -> 香港

3591
wubi_86_district.dict.yaml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

30
wubi_86_user.dict.yaml Normal file
View File

@ -0,0 +1,30 @@
# encoding: utf-8
# Rime dictionary
---
name: wubi_86_user
version: "2024.02.25"
sort: by_weight
columns:
- text
- code
- weight
...
Rime rime 7
中州韵 rime 6
https://rime.im/ rime 5
小狼毫 rime 4
weasel rime 3
鼠须管 rime 2
squirrel rime 1
lishouzhong.com lsz
lishouzhong lsz
git git 1
github.com github 2
github github 1
李守中 spkh

31921
wubi_86_win10_single.dict.yaml Normal file

File diff suppressed because it is too large Load Diff

144
zh_numbers.schema.yaml Normal file
View File

@ -0,0 +1,144 @@
# encoding: utf-8
# Rime schema settings
#
# Original schema author
# Rime 官方教程: 數字之道
#
# Changelog
#
# 2022-09-14 Li Ding <ld.sino@outlook.com>
# - 从教程导出并整理本方案
#
schema:
schema_id: zh_numbers
name: 中文数字
version: "2022-09-14"
description: 快捷输入中文大小写数字
switches:
- name: full_shape
states: [ 壹贰叁, 一二三 ]
reset: 0
engine:
processors:
- key_binder
- punctuator
- selector
- express_editor
segmentors:
- punct_segmentor
translators:
- punct_translator
menu:
# 选择候选词的键,相当于 12345
# 因为这个输入方案中的数字已经用于输入文字了,
# 不能使用12345作为候选词的选择键
alternative_select_keys: "acegi"
punctuator:
half_shape:
# 壹贰叁 模式下
"1":
"2":
"3":
"4":
"5":
"6":
"7":
"8":
"9":
"0":
"s":
"b":
"q":
"w":
"j":
"f":
"n":
"y": [ 元, 月, 亿 ]
"r":
"x": 星期
"z": [ 整, 之 ]
"d":
"h":
".":
# shift + key
"!":
"@":
"#":
"$": [ 四, ¥]
"%": [ 五, 百分之 ]
"^":
"&":
"*":
"(":
")":
"S":
"B":
"Q":
"W":
"J":
"F":
"N":
"Y": [ 元, 月, 亿 ]
"R":
"X": 星期
"Z": [ 整, 之 ]
"D":
"H":
">":
# 一二三 模式下
full_shape:
"1":
"2":
"3":
"4":
"5":
"6":
"7":
"8":
"9":
"0":
"s":
"b":
"q":
"w":
"n":
"y": [ 元, 月, 亿 ]
"r":
"x": 星期
"j":
"f":
"z": [ 整, 之 ]
"d":
"h":
".":
# shift + key
"!":
"@":
"#":
"$": [ 肆, ¥]
"%": [ 伍, 百分之 ]
"^":
"&":
"*":
"(":
")":
"S":
"B":
"Q":
"W":
"J":
"F":
"N":
"Y": [ 元, 月, 亿 ]
"R":
"X": 星期
"Z": [ 整, 之 ]
"D":
"H":
">":