Skip to content
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

feat: 英文词中数字和标点自动转写 #326

Merged
merged 6 commits into from
Jun 6, 2023
Merged

feat: 英文词中数字和标点自动转写 #326

merged 6 commits into from
Jun 6, 2023

Conversation

mirtlecn
Copy link
Collaborator

@mirtlecn mirtlecn commented Jun 6, 2023

  1. 将词库中已有的含标点、数字的英文词输入码补全。以后可以直接按原样(但仍须删除空格)添加这些英文词,输入码交由方案自动派生;
  2. 添加派生算法,自动派生含标点、数字的英文词,效果:
  • 输入 Vtoexvtwoexverex 得到 V2EX

image

  • 输入 i十八nieighteenn 或者 ioneeightn 得到 i18n

image

  • 输入 Nimbus 两千 或者 Nimbus twoOOO 得到 Nimbus 2000

image

  • 输入 githubdotcom 或者 github点com 得到 github.com

Note

ℹ️派生需要词库有相关词汇;
⚠️使用非雾凇拼音方案的用户需要手动修改 melt_eng 方案中的算法 __include 值

close #323

@mirtlecn
Copy link
Collaborator Author

mirtlecn commented Jun 6, 2023

本想要将斜杠 / 派生为 slash,但不清楚怎么在 derive 中表达斜杠,普通的正则 \/ \\/ 还尝试了 '[/]' 均不起作用,还会报错。 @iDvel

另外,因为在开启自动调频的情况下,码长会影响候选项的位置。在词库中写全输入码还是比较重要的。不将数字符号写全的做法在开启英文用户词典后会产生不少意外的候选项排序。

@iDvel
Copy link
Owner

iDvel commented Jun 6, 2023

试了一下可以这样写,用空格隔开:

- derive / slash

@iDvel iDvel merged commit 3f67fc6 into iDvel:main Jun 6, 2023
@mirtlecn mirtlecn deleted the 1oneyi branch June 7, 2023 00:57
@iDvel
Copy link
Owner

iDvel commented Jun 7, 2023

      # 当开启自动调频时,保证大写+小写开头的词排在全大写的前面
      - derive/^([A-Z][A-Z]+)[a-z]+/$1/

这行没太明白什么意思,导致了输入 mac 的时候,候选项中 MAC地址Mac 的上面了,先注释掉了。

@mirtlecn
Copy link
Collaborator Author

mirtlecn commented Jun 7, 2023

      # 当开启自动调频时,保证大写+小写开头的词排在全大写的前面
      - derive/^([A-Z][A-Z]+)[a-z]+/$1/

这行没太明白什么意思,导致了输入 mac 的时候,候选项中 MAC地址Mac 的上面了,先注释掉了。

我删掉吧,在本方案中没用。是用在大写自动调频上的。

lovelock pushed a commit to lovelock/rime-ice that referenced this pull request Jun 8, 2023
luckmoon pushed a commit to luckmoon/rime-ice that referenced this pull request Jun 8, 2023
ann61c pushed a commit to ann61c/rime-ice that referenced this pull request Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

日常纠错和功能建议
2 participants