-
Notifications
You must be signed in to change notification settings - Fork 1
/
jap_poly_nano.schema.yaml
85 lines (80 loc) · 2.21 KB
/
jap_poly_nano.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
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: jap_poly_nano
name: Japanese Poly Nano
version: "0.2.1"
author:
- polyhedron <polyhedron@gmail.com>
- tumuyan <tumuyan@21cn.com>
description:
Japanese Poly Nano,基于Poly日文修改。
只包含少量假名词汇去除了纯汉字词条,方便中日文混合输入的方案调用。
小寫假名用x前導,shift+字母輸入片仮名(支持程度有限)。禁止単独輸入ー。
switches:
- name: ascii_mode
reset: 0
states: [ 日語, 西文 ]
- name: half_shape
states: [ 半角, 全角 ]
reset: 0
engine:
processors:
- ascii_composer
- key_binder
- speller
- recognizer
- selector
- navigator
- express_editor
segmentors:
- matcher
- ascii_segmentor
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- table_translator
- punct_translator
filters:
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA-_
initials: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
delimiter: " '"
algebra:
# 拼写规则的本质,是把字典按照规则改写,而不是把输入的按键码转写。
# 把x引导单词转写为大写,以适应输入时未切换大小写
# - derive/x([a-z]+)/\U$1/
# - derive/x([a-z])/\U$1/
# 增加了大写编码的片假名词条。通过转写,令用户输入首字母大写后续小写,或者x小写后续大写,同样能够录入片假名。
- derive/([A-Z])([A-Z]*)/$1\L$2/
- derive/X([A-Z])/x\L$1/
# 把带空格的单词转写为无符号
- derive/[\s]+/
# Jap_poly原 algebra:
- derive/x/q/
# - derive/l/r/
- derive/si/shi/
- derive/sy([auo])/sh$1/
- derive/zi/ji/
- derive/zy([auo])/j$1/
- derive/tu/tsu/
- derive/ti/chi/
- derive/ty([auo])/ch$1/
- derive/hu/fu/
translator:
dictionary: jap_poly_nano
spelling_hints: 9
preedit_format:
- derive/([A-Za-z]+)/\L$1/
key_binder:
import_preset: default
bindings:
- {accept: minus, send: '-', when: has_menu}
- {accept: equal, send: '=', when: has_menu}
punctuator:
import_preset: default
recognizer:
import_preset: default