-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcombo_pinyin_engrammer.schema.yaml
136 lines (122 loc) · 3.43 KB
/
combo_pinyin_engrammer.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Rime schema
# encoding: utf-8
schema:
schema_id: combo_pinyin_engrammer
name: 宮保拼音Engrammer
version: '3.0'
author:
- 居戎氏 <[email protected]>
description: |
並擊輸入拼音
https://github.com/rime/home/wiki/ComboPinyin
dependencies:
- rime_frost
switches:
- name: ascii_mode
reset: 0
states: [中文, 西文]
- name: full_shape
states: [半角, 全角]
- name: traditionalization
states: [简, 繁]
reset: 0
- name: ascii_punct
states: [。,, .,]
- name: emoji
states: [💀, 😄]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
engine:
processors:
- lua_processor@select_character # 以词定字
- ascii_composer #
- recognizer
- chord_composer # 實現並擊按鍵處理
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
filters:
- lua_filter@*is_in_user_dict # 用户词典的词加上一个*
- lua_filter@corrector # 错音错字提示
- lua_filter@long_word_filter # 长词优先(顺序要求:长词优先 > Emoji)
- simplifier@traditionalize # 简繁切换
- simplifier@emoji # Emoji
- simplifier@kaomoji # 颜文字
- uniquifier
chord_composer:
editor:
bindings:
BackSpace: back_syllable
## Lua 配置:长词优先
## 提升 count 个词语,插入到第 idx 个位置。
## 示例:将 2 个词插入到第 4、5 个候选项,输入 jie 得到「1接 2解 3姐 4饥饿 5极恶」
long_word_filter:
count: 2
idx: 4
speller:
alphabet: "zyxwvutsrqponmlkjihgfedcba'"
initials: "zyxwvutsrqponmlkjihgfedcba"
delimiter: " "
algebra:
# 合併音節
- derive/^lo$/lou/
# 合併 ⟨o / ou⟩、⟨e / ei⟩兩組韻母
#- derive/^([bpmf])?ou$/$1o/
#- derive/^([zcsr]h?)?ei$/$1e/
# 拼音音節一律後加隔音符號,避免音節切分歧義
- "xform/^([a-z]+)$/$1'/"
translator:
dictionary: rime_frost
prism: combo_pinyin
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
- "xform/' /'/"
punctuator:
import_preset: default
key_binder:
import_preset: default
recognizer:
import_preset: default
__patch:
# 默認佈局:七指禪
# - combo_pinyin_layouts:/use_pc_layout
# 解封下列代碼,選用其他佈局選項
# 七指禪,運用縮略碼
# - combo_pinyin_layouts:/use_pc_layout_with_briefs
# 八指禪,默認配置:字母 A = 宮保拼音碼 H
- combo_pinyin_layouts:/use_engrammer_layout
# 八指禪,可選配置:設定左手拇指位 H 的鍵碼
# - combo_pinyin_layouts:/use_semicolon
# - combo_pinyin_layouts:/use_apostrophe
#- combo_pinyin_layouts:/use_control
# - combo_pinyin_layouts:/use_alt
# - combo_pinyin_layouts:/use_shift
# 回車鍵上屏按鍵序列
- combo_pinyin_layouts:/use_return_to_commit_raw_input
# 回車鍵確認當前候選
# - combo_pinyin_layouts:/use_return_to_confirm
# 使用八股文語言模型
- grammar:/amz?
# 用家自選配置
# - combo_pinyin_engrammer.custom:/patch?
# emoji kaomoji 转换
- emoji:/emoji?
- kaomoji:/kaomoji?
- traditionalize:/s2t?