-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
临时英文输出方案 #154
Comments
跟 #138 (comment) 同理呀, # Z开关输入英文
english: "Z[a-zA-Z]*$" 就把 |
感觉是没配置正确,不仅要加recognizer pattern,还要加前缀分段器相应的翻译器。配置正确的情况应该是有像我链接的那个issue里的英文单词候选框的。中午我回去看看
…---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 日期 | 2024年10月14日 10:16 |
| 收件人 | ***@***.***> |
| 抄送至 | Zhai ***@***.***>***@***.***> |
| 主题 | Re: [KyleBing/rime-wubi86-jidian] 临时英文输出方案 (Issue #154) |
image.png (view on web)
按回车是可以把分号去了,可是我想按空格上屏时把分号去了,应该怎么改一下,谢谢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
diff --git a/wubi86_jidian.schema.yaml b/wubi86_jidian.schema.yaml
index 47ffeaf..9466a94 100644
--- a/wubi86_jidian.schema.yaml
+++ b/wubi86_jidian.schema.yaml
@@ -42,6 +42,7 @@ engine:
segmentors:
- ascii_segmentor
- matcher
+ - affix_segmentor@english
- abc_segmentor
- punct_segmentor
- fallback_segmentor
@@ -49,6 +50,7 @@ engine:
- punct_translator
- reverse_lookup_translator
- table_translator
+ - table_translator@english
- lua_translator@*wubi86_jidian_date_translator # 日期、时间、星期
- history_translator@repeat_last_input # 重复上一次输入,对应下面的 repeat_last_input
filters:
@@ -56,7 +58,13 @@ engine:
# - lua_filter@*wubi86_jidian_single_char_first_filter # 单字优先
# - lua_filter@*wubi86_jidian_single_char_only # 纯单字
-
+english:
+ tag: english
+ prefix: ";" # 反查前缀,以它为起点
+ tips: 〔En〕 # 反查时的提示信息
+ enable_completion: true
+ enable_sentence: false
+ initial_quality: 1.1
# 自动造词功能:参阅: https://github.com/KyleBing/rime-wubi86-jidian#6-%E5%BC%80%E5%90%AF%E8%87%AA%E5%8A%A8%E9%80%A0%E8%AF%8D
@@ -122,6 +130,7 @@ recognizer:
patterns:
# punct: "^/([0-9]+[a-z]*|[a-z]+)$" # 注意前方需要有4个空格,跟下面对齐
reverse_lookup: "^z[a-z]*'?$" # 反查词条的正则
+ english: '^;[a-zA-Z]*$'
# 重复上一次输入
repeat_last_input:
如果要启用英文词典,把英文方案文件(以melt_eng为例,就是 diff --git a/wubi86_jidian.schema.yaml b/wubi86_jidian.schema.yaml
index 9466a94..46045d1 100644
--- a/wubi86_jidian.schema.yaml
+++ b/wubi86_jidian.schema.yaml
@@ -12,6 +12,7 @@ schema:
description: |
五笔字形 86 极点极爽版,方案由 KyleBing 修改 - 2019年11月08日 10:26
dependencies:
+ - melt_eng
# - pinyin_simp
switches:
@@ -60,6 +61,7 @@ engine:
english:
tag: english
+ dictionary: melt_eng
prefix: ";" # 反查前缀,以它为起点
tips: 〔En〕 # 反查时的提示信息
enable_completion: true
|
遇到高人了,实在是太牛了,简单的几个配置就搞定了。 |
我的现在是输入分号后再输入英文,空格上屏了英文,但按回车还带上了分号,有办法回车时也不带分号吗? |
想实现的是,平时输入时,编码<4,按回车直接编码上屏。同时按分号临时英文,回车或空格英文上屏,但不包括分号。 |
如果可以拿lua的话,可以参考 #138 (comment) |
多谢,用了lua还是不行啊。 |
与我的editor有关吗?
|
我所有的配置在这,麻烦大佬给看看:https://www.jianguoyun.com/p/DSL8t1oQ4_OoDBiCs9IFIAA |
好像是
|
果然如此,多谢,多谢。 |
还有临时英文中想输入 |
改下recognizer - patterns就好了: |
完美,完美,太感谢了。让您一步步教。 |
在中文状态时,有没有一个临时输出英文字符的方案; 目前我看到的是开头大写字母是可以的,但是很多时候我想输英文的时候并不是以大写字母开头的。
The text was updated successfully, but these errors were encountered: