-
Notifications
You must be signed in to change notification settings - Fork 6
/
luna_pinyin_nushu.schema.yaml
86 lines (78 loc) · 2.08 KB
/
luna_pinyin_nushu.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
# Rime schema
# encoding: utf-8
__include: luna_pinyin_simp.schema:/
schema:
schema_id: luna_pinyin_nushu
name: 朙月拼音・女书
version: "2020.07.22"
author:
- sgalal <[email protected]>
dependencies:
- luna_pinyin
- nushu
description: |-
使用江永方言拼音与普通话两种方式输入女书,支持 Unicode 编码的 396 个女书字符。
按下 ` 键,可以使用女书拼音输入女书字符。
按下 Ctrl+Shift+4 可以退出或再次进入女书输入模式。
本方案依赖「女书」输入方案。
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: zh_simp
reset: 1
states: [ 漢字, 汉字 ]
- name: nushu_convert
reset: 1
states: [ 汉字, 女书 ]
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@nushu
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator@custom_phrase
- script_translator
- script_translator@nushu
filters:
- simplifier
- uniquifier # 此项不能与下一项颠倒,否则会将对应同一女书的不同汉字合并
- simplifier@nushu_convert
nushu:
__include: nushu.schema:/translator
__patch:
prefix: "`"
suffix: ";"
tips: 『女书拼音』
tag: nushu
nushu_convert:
option_name: nushu_convert
opencc_config: s2nushu.json
tags: [ abc ] # 设置对主翻译器起作用
tips: all # 简化器打开时,提示女书对应的汉字
key_binder:
import_preset: default
bindings:
- { when: always, accept: Control+Shift+4, toggle: nushu_convert }
- { when: always, accept: Control+Shift+dollar, toggle: nushu_convert }
recognizer:
import_preset: default
patterns:
nushu: "^`[a-z']*;?" # press grave to enter Nushu romanization input mode