-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuggx_fluency.schema.yaml
117 lines (105 loc) · 3.02 KB
/
uggx_fluency.schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# vim: set et sts=2 sw=2:
# encoding: utf-8
---
schema:
schema_id: uggx_fluency
name: 连郑
version: '1.4.0'
author:
- X1aomu
description: |
郑码连打模式
dependencies:
- uggx
- uggx.phrases
- pinyin_simp
switches:
- name: ascii_mode
states: [中文, 英文]
reset: 0
- name: full_shape
states: [半角, 全角]
reset: 0
- name: extended_charset
states: [常用, 增广]
reset: 0
- name: ascii_punct
states: [。,, .,]
reset: 0
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@make_dict
- affix_segmentor@pinyin_simp
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator
- table_translator@phrase_encoder
- script_translator@pinyin_simp
filters:
- uniquifier # 去重
- reverse_lookup_filter@pinyin_simp_reverse_lookup
recognizer:
import_preset: default
patterns:
punct: '^/([0-9]|10|[A-Za-z]+)$' # / 开头识别为符号。
pinyin_simp: "`[a-z']*$" # 反查引導鍵 以 ` 开头
key_binder:
import_preset: default
bindings:
# 回车清屏
- {when: composing, accept: Return, send: Escape}
# 设置分号为选择第二候选
- {when: has_menu, accept: semicolon, send: 2}
speller:
delimiter: " '"
max_code_length: 0 # 设置最大码长 开启此选项可以实现顶字上屏
auto_select: false # 是否自动上屏
auto_clear: max_length # 输入全码长无候选时自动清空
punctuator:
import_preset: symbols
translator:
dictionary: uggx # 词库的设置请看 uggx.dict.yaml
db_class: userdb # 设定用户词典类型,可设 tabledb〔文本〕或 userdb〔二进制〕
enable_charset_filter: true # CJK 扩展字符过滤器
enable_user_dict: true # 是否開啓用戶詞典〔用戶詞典記錄動態字詞頻、用戶詞〕
enable_encoder: true # 是否自造词
encode_commit_history: true # 是否對已上屛詞自動成詞
enable_sentence: true # 连打
enable_completion: true # 逐键提示
max_phrase_length: 4 # 自造词长度
phrase_encoder:
__include: translator
dictionary: uggx.phrases
# 反查翻译器,以 ` 开头时生效
pinyin_simp:
__include: pinyin_simp.schema:/translator
prefix: '`'
tips: '〔拼音〕'
tag: pinyin_simp # 必要
# 反查过滤器,给出反查编码提示
pinyin_simp_reverse_lookup:
# 掛在這個 tag 所對應的翻譯器上
# 注:abc 是默认 translator 的 tag,效果为显示出一个字所有可能的编码
tags: [abc, pinyin_simp]
overwrite_comment: false
dictionary: uggx # 反查所用字典
comment_format:
- 'xform/$/〕/'
- 'xform/^/〔/'
__patch:
- emoji_suggestion:/patch? # 尝试引入 emoji 提示(基于 opencc),见 rime-emoji 项目
- uggx_fluency.custom:/patch? # 支持传统的 <config>.custom.yaml 文件