Skip to main content

wubi98_ci.schema.yaml

# by yanhuacuo 2019-01-03
# 配置整合版
# Rime schema settings
# encoding: utf-8

schema:
schema_id: wubi98_ci
name: "五笔"
version: "5.0"
author:
- 發明人 王永民
description: |
五笔98版
碼表源自 yanhuacuo
敲 z 鍵進入拼音反查
dependencies:
- py

switches:
- name: ascii_mode
reset: 0
- name: zh_trad
reset: 0
states: [,]
- name: 98wb_spelling
reset: 0
states: [,]
- name: jiayin
reset: 1
- name: gb2312
reset: 0
states: [,]

engine:
filters:
- charset_filter@gb2312
- simplifier
- "reverse_lookup_filter@ci_reverse_lookup"
- "simplifier@98wb_spelling_rk"
- "simplifier@98wb_spelling"
- "simplifier@jiayin"
- uniquifier
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- "affix_segmentor@mkst"
- "affix_segmentor@rvlk1"
- "affix_segmentor@zhuyin_fix"
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- "table_translator@rvlk1"
- table_translator
- "table_translator@fixed"
- "table_translator@mkst"
- "table_translator@zhuyin_fix"
- "history_translator@history"
- "lua_translator@time_date"

speller:
auto_select: true
auto_clear: max_length
delimiter: "`"
max_code_length: 4

translator:
dictionary: wubi98_ci
db_class: tabledb
initial_quality: 100000
enable_charset_filter: false
enable_sentence: false
enable_encoder: false
encode_commit_history: false
max_phrase_length: 2
enable_completion: true
enable_user_dict: false
disable_user_dict_for_patterns:
- "^z.*$"

fixed:
__include: /translator
initial_quality: 1000
enable_encoder: true
enable_user_dict: true

mkst:
__include: /translator
initial_quality: 10
enable_sentence: true
prefix: '`'
tips: "〔精准造词〕"
tag: mkst

reverse_lookup:
__include: /translator
dictionary: py
tips: "〔拼音反查〕"
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
tag: rvlk2

rvlk1:
__include: /reverse_lookup
prefix: "z"
tag: rvlk1
extra_tags:
- rvlk2

ci_reverse_lookup:
dictionary: wubi98_ci
tips: "〔五笔滤镜〕"
tags:
- rvlk2

zhuyin_fix:
__include: /translator
prefix: '~'
tips: "〔以形查音〕"
tag: zhuyin_fix

simplifier:
opencc_config: s2t.json
option_name: zh_trad

98wb_spelling:
opencc_config: 98wb_spelling.json
option_name: 98wb_spelling
show_in_comment: true
comment_format:
- "xform/☯/ · /"
- "xform/<br>/\r/"
- "xform/※※※/ /"
- "xform/※※/ /"
- "xform/※/ /"
tags:
- abc
# - rvlk1
tips: all

jiayin:
opencc_config: jiayin.json
option_name: jiayin
show_in_comment: true
comment_format:
- "xform/<br>/\r/"
- "xform/&nbsp/ /"
tags:
# - abc
- zhuyin_fix
tips: all

recognizer:
import_preset: default
patterns:
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
mkst: "^[a-y]*`[a-y`]*$"
punct: "^/([0-9]0?|[A-Za-z]+)$"
rvlk1: "^z[a-z]*'?$"
rvlk2: "^z[a-z]*'?$"
uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$"
zhuyin_fix: "~[a-y]*?$"

charset_filter:
option_name: gb2312

history:
input: z
size: 1
initial_quality: 1

key_binder:
bindings:
- {accept: minus, send: Page_Up, when: has_menu}
- {accept: equal, send: Page_Down, when: has_menu}
- {accept: semicolon, send: 2, when: has_menu}
- {accept: apostrophe, send: 3, when: has_menu}
- {accept: space, send: Escape, when: composing}
- {accept: space, send: space, when: has_menu}
- {accept: Return, send: Escape, when: composing}
- {accept: Return, send: Escape, when: has_menu}
- {accept: "Control+Shift+4", toggle: zh_trad, when: always}
- {accept: "Control+Shift+dollar", toggle: zh_trad, when: always}
- {accept: "Control+Shift+F", toggle: zh_trad, when: always}
- {accept: "Control+Shift+H", toggle: 98wb_spelling, when: always}
- {accept: "Control+Shift+J", toggle: 98wb_spelling, when: always}
- {accept: "Control+Shift+K", toggle: 98wb_spelling_rk, when: always}
- {accept: "Control+Shift+U", toggle: gb2312, when: always}
- {accept: "Control+Shift+I", toggle: gb2312, when: always}
- {accept: "Control+Shift+O", toggle: gb2312, when: always}

punctuator:
import_preset: symbols

style:
font_face: 'YaoSans'
font_point: 16
color_scheme: wechat
color_scheme_dark: wechat_dark
text_orientation: horizontal
candidate_list_layout: linear
inline_preedit: true
border_height: 0
border_width: 0
corner_radius: 8
spacing: 8

preset_color_schemes:
wechat:
name: "微信键盘 / WeChat-keyboard" # 配色取自微信键盘
author: zsakvo
back_color: 0xC8F0F0F0
comment_text_color: 0x999999
hilited_candidate_back_color: 0x75B100
hilited_candidate_text_color: 0xFFFFFF
hilited_mark_color: 0xBF616A # 标签前的标记
horizontal: true
text_color: 0x424242
border_color: 0xFFFFFF
# 选中区域配色
hilited_candidate_shadow_color: 0xDDDDDD # 阴影
# 候选框配色
shadow_color: 0xDDDDDD
wechat_dark:
name: '微信键盘_深色 / WeChat-keyboard_dark' # 配色取自微信键盘
back_color: 0xC85D5D5D #设置输入条的背景色,色值是按照 BGR 的形式 16 进制填写
border_color: 0x151515 #输入条边框颜色,似乎在横向模式下不起作用
border_color_width: 0 #输入条边框宽度
candidate_text_color: 0xFFFFFF #候选字颜色
text_color: 0xFFFFFF #普通候选字的颜色,非第一候选字
hilited_candidate_label_color: 0x151515 #第一候选字标签颜色,也就是数字 1
hilited_text_color: 0x151515 #第一候选字颜色
hilited_candidate_back_color: 0x75B100 #第一候选字高亮颜色(背景色)
# label_color: 0x888888 #普通标签的颜色(非第一候选字),也就是候选字数字
hilited_candidate_shadow_color: 0xDDDDDD # 阴影