-
Notifications
You must be signed in to change notification settings - Fork 683
/
Copy patht9.schema.yaml
103 lines (94 loc) · 2.72 KB
/
t9.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
# Rime schema
# encoding: utf-8
# 适配了仓输入法 [Hamster](https://github.com/imfuxiao/Hamster/) 九宫格布局。
#
# 可选,支持英文:
# 1. 解开 `engine/translators` 下的注释
# 2. 将 `others/Hamster/melt_eng.custom.yaml` 里的文件拷贝至配置目录,该补丁转写了英文的拼写规则到九宫格;
__include: rime_ice.schema.yaml:/
schema:
schema_id: t9
name: 仓·九宫格
version: "2.0.0"
author:
- Dvel
- "[morse.hsiao](https://github.com/imfuxiao)"
description: |
九宫格 for 仓输入法
dependencies:
- melt_eng # 英文输入,作为次翻译器挂载到拼音方案
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
- lua_translator@*date_translator # 时间、日期、星期
- table_translator@custom_phrase # 自定义短语 custom_phrase_t9.txt
# - table_translator@melt_eng # 英文输入
filters:
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- uniquifier # 去重
translator:
prism: t9
spelling_hints: 100
comment_format: []
# 自定义短语:custom_phrase_t9.txt
# ⚠️ 编码要用数字
custom_phrase:
dictionary: ""
user_dict: custom_phrase_t9
db_class: stabledb
enable_completion: false
enable_sentence: false
initial_quality: 99
# 九宫格 1 键上的符号序列
punctuator:
half_shape:
"1": [1, "@", ".", "/", ":", "_", "-", "#"]
"@": [1, "@", !, :, 、, ……, ~]
"#": [0, "#", "$", "%", "^", "&", "*", "(", ")"]
# 输入时按 1 可以分词
key_binder:
bindings:
- { when: has_menu, accept: 1, send: apostrophe }
speller:
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA987654321
initials: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA987654321
algebra:
# ### 超级简拼
- abbrev/^([a-z]).+$/$1/ # 超级简拼
- abbrev/^([zcs]h).+$/$1/ # 超级简拼中,zh ch sh 视为整体(ch'sh → 城市),而不是像这样分开(c'h's'h → 吃好睡好)。
- derive/^([nl])ve$/$1ue/
- 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/
# ### 九宫格数字映射
- derive/[abc]/2/
- derive/[def]/3/
- derive/[hgi]/4/
- derive/[jkl]/5/
- derive/[omn]/6/
- derive/[pqrs]/7/
- derive/[tuv]/8/
- derive/[wxyz]/9/