forked from hosxy/rime-aurora-pinyin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aurora_pinyin.schema.yaml
114 lines (104 loc) · 2.55 KB
/
aurora_pinyin.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
# Rime schema
# encoding: utf-8
schema:
schema_id: aurora_pinyin
name: 极光拼音
version: "0.1"
author:
- hosxy
description: |
为简体中文用户设计的拼音输入方案
包括《通用规范汉字表》全部8105个汉字及部分未收录汉字/字符
dependencies:
- stroke
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: ascii_punct
states: [ 。,, ., ]
- options: ["gb2312","gbk","utf8"] # 字符集
reset: 1 # 默认为 GBK 字符集(常用字)
states: [GB2312, 常用字(GBK), 生僻字(UTF-8)]
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
- script_translator
filters:
- uniquifier
- charset_filter@gb2312
- charset_filter@gbk
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^xx$/
- fuzz/^([m-n]).+$/$1/ # 解决部分 单声母拟声字 候选词问题
- abbrev/^([a-z]).+$/$1/
- abbrev/^([zcs]h).+$/$1/
- derive/^([nl])ve$/$1ue/
- derive/^([jqxy])u/$1v/
- derive/([dtngkhrzcs])o(u|ng)$/$1o/
# 纠错
- derive/un$/uen/ # uen > un
- derive/ui$/uei/ # uei > ui
- derive/iu$/iou/ # iou > ui
- derive/([aeiou])ng$/$1gn/ # gn > ng
- derive/ong$/on/ # on > ong
- derive/ao$/oa/ # oa > ao
- derive/([iu])a(o|ng?)$/a$1$2/ # aio > iao, aing > iang, aung > uang
- derive/tie$/tei/ # tei > tie
- derive/i$/ii/ # ii > i i 错按两次
- derive/u$/uu/ # uu > u u 错按两次
- derive/xia$/cia/ # cia > xia
translator:
dictionary: aurora_pinyin
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:
import_preset: symbols
full_shape:
"\\" : "、"
"#" : "#"
"@" : "@"
half_shape:
"\\" : "、"
"#" : "#"
"@" : "@"
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: '^/([0-9]0?|[A-Za-z]+)$'
reverse_lookup: "`[a-z]*'?$"