Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b1d25a11b | |||
| c89669b313 | |||
| 9a2a217bf5 | |||
| e7ff22a663 | |||
| a022f0943f | |||
| a544300c2d | |||
| 936dec1300 | |||
| b8fdd28747 | |||
| 547ac9e069 | |||
| 5157224d1b | |||
| 8fa127cf8f | |||
| e295b28f97 | |||
| 7e5fb5270b | |||
| 54643322c7 | |||
| 4d67eb7406 | |||
| 7c7abd4a52 | |||
| 87a7de47e9 | |||
| 06074ecb7b | |||
| ea74e40bec | |||
| 3542aa9fec | |||
| f75e70d3c2 | |||
| 9cf93a65ce | |||
| d1f49235bb | |||
| 5bb6b00aa4 | |||
| a3b7d073c9 | |||
| 2ea99c5e4f | |||
| 16affc6674 | |||
| 2cf8aa100b | |||
| 1a3a57d067 | |||
| fc1cf8f90b | |||
| e04b3d4592 | |||
| fe27ae8fe6 | |||
| 4dd55a62eb | |||
| 0fe3a8f958 | |||
| 0ff2c93762 | |||
| b9f3e511e4 | |||
| 59f81a5a18 | |||
| 0367c85243 | |||
| 4fbd67f1dc | |||
| 0407f13bfd | |||
| bab54fd172 | |||
| 66d083bc75 | |||
| 5f30dfbd72 | |||
| 0dc8c2d84b | |||
| 63671a96a9 | |||
| 7942d9c328 | |||
| f7aa0c7437 | |||
| a85c1dd911 | |||
| 2fec735d66 | |||
| ac1579e96d | |||
| 918e6ed11b | |||
| a8f5b6ceee | |||
| f37863cbc5 | |||
| 5903b2780e | |||
| f0bf04f328 | |||
| 4ad08e5c08 | |||
| 9c7d1287f4 | |||
| fce588292f | |||
| 3c9dd7d77d | |||
| 3c8ba3d3db | |||
| 3717e90855 | |||
| 028ecec79f | |||
| b812a8b2c7 | |||
| eec59685c4 | |||
| bf863a9edb | |||
| 3e1e8d9691 | |||
| 546017504a | |||
| 2b4bf3afeb | |||
| 6e9f7a2685 | |||
| 49c1bd78f2 | |||
| bd5bcceb88 | |||
| f7423ecfa1 | |||
| 60a2d21d92 | |||
| 4fbf489038 | |||
| 37ca416a9c | |||
| 9d79f2920e | |||
| 9503250adf | |||
| 11e8efc194 | |||
| b70ef9cd46 | |||
| 25988ae752 | |||
| fdb6141a18 | |||
| 6431222558 | |||
| b2cb11c0d6 | |||
| 0b59306d61 | |||
| 12daff6ef1 | |||
| af2480ba1b | |||
| 69381881ef | |||
| cd4534a28d | |||
| 50e0ddf6a2 | |||
| 21f3cb8625 | |||
| e33e1d2c44 | |||
| 0d93df2174 | |||
| c5b8efc6ad | |||
| edee978ed4 | |||
| 9c4399aae2 | |||
| 1ac25b3ed5 | |||
| d0a6143f93 | |||
| ea7770e408 |
@@ -0,0 +1,76 @@
|
||||
name: Bug 报告
|
||||
description: 我遇到了一个 bug 或是非预期行为
|
||||
title: '[Bug]: '
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: input
|
||||
id: input
|
||||
attributes:
|
||||
label: 摘要
|
||||
description: 一两句话概述遇到的问题
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: check_box
|
||||
attributes:
|
||||
label: 基本检查
|
||||
description: 如实勾选相关选项,以提高沟通的效率
|
||||
options:
|
||||
- label: 我使用的是雾凇拼音 iDvel/rime-ice
|
||||
required: true
|
||||
- label: 我搜索了过往的 issue,没找到解决办法
|
||||
required: true
|
||||
- label: 我查看了置顶 issue 和详细介绍,没找到解决办法
|
||||
required: true
|
||||
- label: 不对雾凇拼音进行任何修改,也会有这个问题
|
||||
required: false
|
||||
- label: 雾凇拼音最新 commit 或 Nightly 版,仍然有这个问题
|
||||
required: false
|
||||
- label: 我知晓:如果此 issue 不符合模板,或者长时间不活跃,会被无条件关闭
|
||||
required: true
|
||||
- type: input
|
||||
id: os_version
|
||||
attributes:
|
||||
label: 系统信息
|
||||
description: 请提供你能复现此问题的系统名称,以及版本号
|
||||
placeholder: macOS 14.5 / Windows 11 23H2 / Ubuntu 22.04 LTS
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: app_version
|
||||
attributes:
|
||||
label: 应用信息
|
||||
description: 提供你使用的 RIME 前端和版本号,自构建前端请说明
|
||||
placeholder: Squirrel 1.0.2 / Weasel 0.16.1
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: step_to_reproduce
|
||||
attributes:
|
||||
label: 复现办法和预期行为
|
||||
description: 重现该问题的办法,雾凇在你预期中应当如何行为
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: info
|
||||
attributes:
|
||||
label: '补充信息'
|
||||
description: ' 请提供你认为重要的其他信息,例如截图、视频、Rime 的报错信息等'
|
||||
- type: textarea
|
||||
id: config
|
||||
attributes:
|
||||
label: 自定义配置
|
||||
description: 如果你对雾凇进行了修改或者打了补丁,请在此处提供你的自定义配置
|
||||
placeholder: |
|
||||
完整配置文件请压缩上传。
|
||||
配置片段请包裹在 Markdown 代码块中。即用三个反引号(```)包裹,如
|
||||
```yaml
|
||||
# 你的配置片段
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
blank_issues_enabled: false
|
||||
|
||||
contact_links:
|
||||
- name: 词库问题
|
||||
url: https://github.com/iDvel/rime-ice/issues/666
|
||||
about: 如果你发现了词库中有字词音形有错讹、缺漏等情况,请直接在这个链接中评论。鼓励你直接 PR,参与雾凇的维护。
|
||||
|
||||
- name: 雾凇拼音详细介绍
|
||||
url: https://dvel.me/posts/rime-ice/
|
||||
about: 这里是雾凇拼音的详细介绍,包括了安装、配置、使用和配置思路等内容。
|
||||
|
||||
- name: 雾凇拼音常见问题
|
||||
url: https://github.com/iDvel/rime-ice/issues/133
|
||||
about: 这里有一些重要问题的答案,提问前请查看,也请事先搜索 issue,你的问题也许已经有现成的答案。
|
||||
|
||||
- name: RIME 定制文档
|
||||
url: https://github.com/rime/home/wiki
|
||||
about: 这里有自定义 RIME 方案的全面教程。
|
||||
|
||||
- name: 小狼毫(Weasel)文档
|
||||
url: https://github.com/rime/weasel/wiki
|
||||
about: 这里有定制 Weasel 样式和行为的指导。
|
||||
|
||||
- name: 鼠须管(Squirrel)文档
|
||||
url: https://github.com/LEOYoon-Tsaw/Rime_collections/blob/master/鼠鬚管介面配置指南.md
|
||||
about: 这里有定制 Squirrel 样式和行为的参考资料。
|
||||
@@ -0,0 +1,47 @@
|
||||
name: 想法、求助和提议
|
||||
description: 我有一些想法和建议;或是一些不理解的地方想要求助
|
||||
|
||||
body:
|
||||
- type: input
|
||||
id: summary
|
||||
attributes:
|
||||
label: 摘要
|
||||
description: 用一两句话概括此 issue 的内容
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: app_version
|
||||
attributes:
|
||||
label: 相关应用
|
||||
description: 这个议题涉及的,或者是你在使用的 RIME 前端
|
||||
placeholder: e.g. Squirrel 1.0.2 / Fcitx5 for Android 0.9 / Weasel CI 9bc58
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os_version
|
||||
attributes:
|
||||
label: 系统信息
|
||||
description: 这个议题涉及的,或者是你在使用的系统及版本号,Unix/Linux 请提供具体发行版名称
|
||||
placeholder: e.g. macOS 14.5 / Windows 11 23H2 / Ubuntu 22.04 LTS
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: content
|
||||
attributes:
|
||||
label: 详细说明
|
||||
description: 请详细说明你的问题或者想法,越具体越好。可以辅以图片、视频等资料。
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: config
|
||||
attributes:
|
||||
label: 补充信息
|
||||
description: 此处可以提供配置文件片段、完整配置文件压缩包、或者日志等信息。你认为相关的 issue 也可以在此处注明。
|
||||
placeholder: |
|
||||
完整配置文件请压缩上传。
|
||||
|
||||
配置片段请包裹在 Markdown 代码块中。即用三个反引号(```)包裹,如
|
||||
```yaml
|
||||
# 你的配置片段
|
||||
```
|
||||
|
||||
@@ -1,27 +1,41 @@
|
||||
name: Pack and Release
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '[0-9]+.*'
|
||||
- "[0-9]+.*"
|
||||
paths:
|
||||
- '**/**'
|
||||
- '!**.md'
|
||||
- '!**.gitignore'
|
||||
- '!others/**'
|
||||
- '!.github/**'
|
||||
- "**/**"
|
||||
- "!**.md"
|
||||
- "!**.gitignore"
|
||||
- "!.github/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Release:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'iDvel/rime-ice'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
if: ${{ contains(github.event.head_commit.message, ' [build]') || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22
|
||||
|
||||
- name: Check and build
|
||||
id: check_and_build
|
||||
if: ${{ contains(github.event.head_commit.message, ' [build]') || github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
cd others/script
|
||||
go mod tidy
|
||||
go run main.go --rime_path "${{ github.workspace }}" --auto_confirm
|
||||
|
||||
- name: Pack dicts
|
||||
run: |
|
||||
mkdir dist
|
||||
@@ -29,28 +43,33 @@ jobs:
|
||||
find . -maxdepth 1 -name "*.lua" -o -name "*.yaml" -o -name "*.txt" | zip dist/full.zip -@
|
||||
zip -r dist/full.zip cn_dicts en_dicts lua opencc LICENSE
|
||||
echo "Pack dicts ..."
|
||||
zip -r dist/all_dicts.zip cn_dicts en_dicts radical_pinyin.dict.yaml
|
||||
zip -r dist/all_dicts.zip cn_dicts en_dicts opencc radical_pinyin.dict.yaml
|
||||
echo "Pack cn_dicts ..."
|
||||
zip -r dist/cn_dicts.zip cn_dicts
|
||||
echo "Pack en_dicts ..."
|
||||
zip -r dist/en_dicts.zip en_dicts
|
||||
echo "Pack opencc ..."
|
||||
zip -r dist/opencc.zip opencc
|
||||
echo "copy LICENSE and README.md..."
|
||||
cp LICENSE dist/LICENSE.txt
|
||||
cp README.md dist/README.md
|
||||
|
||||
- name: Create nightly release
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: 'softprops/action-gh-release@v2'
|
||||
uses: "softprops/action-gh-release@v2"
|
||||
with:
|
||||
body: |
|
||||
## 说明
|
||||
|
||||
|
||||
这里是每次提交后自动打包的版本,包含最新的功能和词库
|
||||
|
||||
- `README.md`:简易的使用说明
|
||||
- `full.zip` : 包含所有词典和方案文件
|
||||
- `cn_dicts.zip`:中文词库
|
||||
- `en_dicts.zip`:英文词库
|
||||
- `opencc.zip`:opencc 词库(emoji 等)
|
||||
- `all_dicts.zip`:以上三个词库的整合
|
||||
- `LICENSE.txt`:开源协议
|
||||
|
||||
tag_name: nightly
|
||||
name: "nightly build"
|
||||
@@ -60,10 +79,24 @@ jobs:
|
||||
|
||||
- name: Create stable release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: 'softprops/action-gh-release@v2'
|
||||
uses: "softprops/action-gh-release@v2"
|
||||
with:
|
||||
body_path: ${{ github.workspace }}/others/CHANGELOG.md
|
||||
draft: true
|
||||
make_latest: true
|
||||
files: |
|
||||
dist/*
|
||||
dist/*
|
||||
|
||||
- name: Push and commit
|
||||
if: ${{ steps.check_and_build.outcome == 'success' }}
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add --all
|
||||
if ! git diff --cached --quiet; then
|
||||
COMMIT_MSG=$(git log -1 --pretty=%B | sed -e 's/\s\[build\]$//' -e 's/^[a-zA-Z()]*:\s*//')
|
||||
git commit -m "build(ci): auto build for -> ${COMMIT_MSG} <-"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit."
|
||||
fi
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
这里是 Rime 的一份配置仓库,用户需要下载各平台对应的前端,并将此配置应用到配置目录。
|
||||
|
||||
雾凇拼音提供了一套开箱即用的完整配置,包含了输入方案(全拼、双拼)、长期维护的词库及各项扩展功能。
|
||||
雾凇拼音提供了一套开箱即用的完整配置,包含输入方案(全拼、常见双拼)、长期维护的开源词库及各项扩展功能。
|
||||
|
||||
详细介绍:[Rime 配置:雾凇拼音](https://dvel.me/posts/rime-ice/)
|
||||
|
||||
@@ -24,33 +24,40 @@
|
||||
|
||||
- 简体 | 全拼 | 双拼
|
||||
- 主要功能
|
||||
- [melt_eng](https://github.com/tumuyan/rime-melt) 英文输入(@tumuyan | [Apache 2.0](https://github.com/tumuyan/rime-melt/blob/master/LICENSE))
|
||||
- 轻量的英文输入,支持中英混输
|
||||
- [优化英文输入体验](https://dvel.me/posts/make-rime-en-better/)
|
||||
- [部件拆字方案](https://github.com/mirtlecn/rime-radical-pinyin) 反查、辅码(@mirtlecn | [CC BY-SA 4.0](https://github.com/mirtlecn/rime-radical-pinyin/blob/master/LICENSE))
|
||||
- 拆字反查(<kbd>uU</kbd>+拼音),拆字辅码(拼音+<kbd>`</kbd>+拆字辅码)
|
||||
- 自整理的 Emoji
|
||||
- [以词定字](https://github.com/BlindingDark/rime-lua-select-character)(@BlindingDark | [LGPL 3.0](https://github.com/BlindingDark/rime-lua-select-character/blob/master/LICENSE))
|
||||
- [长词优先](https://github.com/tumuyan/rime-melt/blob/master/lua/melt.lua)(@tumuyan | [Apache 2.0](https://github.com/tumuyan/rime-melt/blob/master/LICENSE))
|
||||
- [Unicode](https://github.com/shewer/librime-lua-script/blob/main/lua/component/unicode.lua)(@shewer | [MIT](https://github.com/shewer/librime-lua-script/blob/main/lua/component/unicode.lua))
|
||||
- [数字、人民币大写](https://github.com/yanhuacuo/98wubi/blob/master/lua/number.lua)(@98wubi)
|
||||
- 日期、时间、星期、[农历](https://github.com/boomker/rime-fast-xhup)(@boomker | [LGPL 3.0](https://github.com/boomker/rime-fast-xhup/blob/master/LICENSE))
|
||||
- 以词定字(左右中括号:<kbd>[</kbd>、<kbd>]</kbd>)
|
||||
- 长词优先
|
||||
- Unicode(<kbd>U</kbd>+Unicode 码位)
|
||||
- 数字、人民币大写(<kbd>R</kbd>+数字)
|
||||
- 日期、时间、星期(详见方案 `/date_translator` 节点)
|
||||
- 农历(转写:<kbd>N</kbd>+八位数字;获取当前农历:全拼<kbd>nl</kbd>,双拼<kbd>lunar</kbd>)
|
||||
- 常见错音错字提示
|
||||
- 置顶候选项
|
||||
- 所有标点符号直接上屏,/ 模式改为 v 模式,/ 直接上屏
|
||||
- 增加了许多拼音纠错
|
||||
- 置顶候选项(详见方案 `/pin_cand_filter` 节点)
|
||||
- 所有标点符号直接上屏
|
||||
- 特殊符号、字符输入(全拼<kbd>v</kbd>+首字母缩写;双拼<kbd>V</kbd>+首字母缩写)
|
||||
- 拼音纠错(模糊音)
|
||||
- 更多默认未启用的功能请参考 `rime.lua` 文件以及方案注释
|
||||
- 简体字表、词库
|
||||
- [《通用规范汉字表》](https://github.com/iDvel/The-Table-of-General-Standard-Chinese-Characters)
|
||||
- [华宇野风系统词库](http://bbs.pinyin.thunisoft.com/forum.php?mod=viewthread&tid=30049)(@野风)
|
||||
- [清华大学开源词库](https://github.com/thunlp/THUOCL)(@THUNLP | [MIT](https://github.com/thunlp/THUOCL/blob/master/LICENSE))
|
||||
- [现代汉语常用词表](https://gist.github.com/indiejoseph/eae09c673460aa0b56db)(@Joseph cheng)
|
||||
- [腾讯词向量](https://ai.tencent.com/ailab/nlp/en/download.html)(@Tencent AI Lab | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/))
|
||||
- 参考
|
||||
- 《现代汉语词典》
|
||||
- 《同义词词林》
|
||||
- 《新华成语大词典》
|
||||
- [通用规范汉字表](https://github.com/iDvel/The-Table-of-General-Standard-Chinese-Characters)(by 中华人民共和国教育部)8K 常用汉字
|
||||
- [Unihan 字库](https://www.unicode.org/Public/)(by Unicode lnc | [UNICODE LICENSE V3](https://www.unicode.org/license.txt))40K 大字库, **默认未启用**
|
||||
- [现代汉语常用词表](https://zh.wikipedia.org/wiki/%E7%8E%B0%E4%BB%A3%E6%B1%89%E8%AF%AD%E5%B8%B8%E7%94%A8%E8%AF%8D%E8%A1%A8)(by 中国国家语言文字工作委员会)
|
||||
- [华宇野风词库](http://bbs.pinyin.thunisoft.com/forum.php?mod=viewthread&tid=30049)(by 野风)
|
||||
- [简化字八股文](https://github.com/rime/rime-essay-simp)(by rime | [LGPL](https://github.com/rime/rime-essay-simp/blob/master/LICENSE))
|
||||
- [清华大学开源词库](https://github.com/thunlp/THUOCL)(by THUNLP | [MIT](https://github.com/thunlp/THUOCL/blob/master/LICENSE))
|
||||
- [腾讯词向量](https://ai.tencent.com/ailab/nlp/en/download.html)(@Huandeep [整理](https://github.com/iDvel/rime-ice/issues/24) | by Tencent AI Lab | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/))
|
||||
- 词库修订
|
||||
- 校对大量异形词、错别字、错误注音
|
||||
- 全词库完成注音
|
||||
- 同义多音字注音
|
||||
- 参考
|
||||
- 《现代汉语词典》
|
||||
- 《同义词词林》
|
||||
- 《新华成语大词典》
|
||||
- [校对标准论坛](http://www.jiaodui.com/bbs/)
|
||||
- Rime、Squirrel、Weasel 常用配置项的详尽注释
|
||||
|
||||
<br>
|
||||
|
||||
@@ -82,10 +89,12 @@
|
||||
|
||||
### 手动安装
|
||||
|
||||
将仓库所有文件复制粘贴到配置目录,重新部署。
|
||||
您可以将仓库打包下载,或者整体 clone 后,将所有文件复制粘贴到配置目录,重新部署。
|
||||
|
||||
更新词库,手动覆盖 `cn_dicts` `en_dcits` `opencc` 三个文件夹。
|
||||
|
||||
您也可以前往 [Release](https://github.com/iDvel/rime-ice/releases) 界面,下载特定版本的词典文件(具体描述见 Release 说明),覆盖配置目录的对应文件。
|
||||
|
||||
### 东风破 [plum](https://github.com/rime/plum)
|
||||
|
||||
选择配方(`others/recipes/*.recipe.yaml`)来进行安装或更新。
|
||||
@@ -135,6 +144,14 @@ bash rime-install iDvel/rime-ice:others/recipes/config:schema=abc
|
||||
bash rime-install iDvel/rime-ice:others/recipes/config:schema=ziguang
|
||||
```
|
||||
|
||||
℞ 下载特定版本的配置
|
||||
|
||||
在仓库后加 `@tag` 即可,例如:
|
||||
|
||||
```sh
|
||||
bash rime-install iDvel/rime-ice@2024.05.21:others/recipes/full
|
||||
```
|
||||
|
||||
### 仓输入法 [Hamster](https://github.com/imfuxiao/Hamster)
|
||||
|
||||
参考 [如何导入"雾淞拼音输入方案"](https://github.com/imfuxiao/Hamster/wiki/%E5%A6%82%E4%BD%95%E5%AF%BC%E5%85%A5%22%E9%9B%BE%E6%B7%9E%E6%8B%BC%E9%9F%B3%E8%BE%93%E5%85%A5%E6%96%B9%E6%A1%88%22)
|
||||
@@ -189,7 +206,16 @@ patch:
|
||||
|
||||
## 感谢 ❤️
|
||||
|
||||
感谢上述提到的词库、方案及功能参考。
|
||||
特别感谢上文已经提及的词库、词典的作者、贡献者及整理者;特别感谢以及下列词库、方案、脚本的作者及贡献者(提及的均为 GitHub id):
|
||||
|
||||
- @mozillazg 开发的汉字转拼音工具和数据库(MIT)
|
||||
- [melt_eng](https://github.com/tumuyan/rime-melt)(@tumuyan | [Apache 2.0](https://github.com/tumuyan/rime-melt/blob/master/LICENSE)) :提供了部分(约 1000 条)英文词汇以及原始英文方案参考;
|
||||
- [部件拆字方案 v1](https://github.com/mirtlecn/rime-radical-pinyin)(@mirtlecn | [CC BY-SA 4.0](https://github.com/mirtlecn/rime-radical-pinyin/blob/master/LICENSE)):提供的拆字反查,辅码插件;
|
||||
- [长词优先插件](https://github.com/tumuyan/rime-melt/blob/master/lua/melt.lua)(@tumuyan | [Apache 2.0](https://github.com/tumuyan/rime-melt/blob/master/LICENSE))
|
||||
- [Unicode 插件](https://github.com/shewer/librime-lua-script/blob/main/lua/component/unicode.lua)(@shewer | [MIT](https://github.com/shewer/librime-lua-script/blob/main/lua/component/unicode.lua))
|
||||
- [数字、人民币大写插件](https://github.com/yanhuacuo/98wubi/blob/master/lua/number.lua)(@98wubi)
|
||||
- [农历插件](https://github.com/boomker/rime-fast-xhup)(@boomker | [LGPL 3.0](https://github.com/boomker/rime-fast-xhup/blob/master/LICENSE))
|
||||
- 未能在此处详述的、在本库源码注释中提及的项目及作者给予的帮助和参考
|
||||
|
||||
感谢 [@Huandeep](https://github.com/Huandeep) 整理的多个词库。
|
||||
|
||||
@@ -197,9 +223,7 @@ patch:
|
||||
|
||||
感谢所有贡献者。
|
||||
|
||||
搜狗转 Rime:[lewangdev/scel2txt](https://github.com/lewangdev/scel2txt)
|
||||
|
||||
大量参考 [校对标准论坛](http://www.jiaodui.com/bbs/)
|
||||
<!-- 搜狗转 Rime:[lewangdev/scel2txt](https://github.com/lewangdev/scel2txt) -->
|
||||
|
||||
Thanks to JetBrains for the OSS development license.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# 这样小字表里存在的字按权重靠前排列,大字表殿后,生僻字自动就排在末尾。
|
||||
---
|
||||
name: 41448
|
||||
version: "2024-05-16"
|
||||
version: "2024-07-28"
|
||||
sort: by_weight
|
||||
...
|
||||
# 注释掉了一些
|
||||
@@ -8676,6 +8676,7 @@ sort: by_weight
|
||||
𩙣 feng
|
||||
𩪌 feng
|
||||
𪐃 feng
|
||||
覅 fiao
|
||||
㤇 fo
|
||||
仏 fo
|
||||
仸 fo
|
||||
@@ -23504,6 +23505,7 @@ sort: by_weight
|
||||
疑 ni
|
||||
眤 ni
|
||||
睨 ni
|
||||
祢 ni
|
||||
秜 ni
|
||||
籾 ni
|
||||
縌 ni
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
# 需要注音的字词设定在 others/script/rime/需要注音.txt
|
||||
---
|
||||
name: 8105
|
||||
version: "2024-05-21"
|
||||
version: "2024-10-30"
|
||||
sort: by_weight
|
||||
...
|
||||
### 按需启用
|
||||
@@ -45,7 +45,6 @@ sort: by_weight
|
||||
|
||||
### 扩展,不在《通用规范汉字表》的字:
|
||||
𤭢 cei 1000
|
||||
𤭢了 cei le 1000
|
||||
𰻝 biang 1
|
||||
嬢 niang 1
|
||||
薙 ti 1
|
||||
@@ -60,6 +59,8 @@ sort: by_weight
|
||||
珮 pei 0
|
||||
睆 huan 1
|
||||
挼 rua 1
|
||||
㨃 dui 1
|
||||
|
||||
# 注释掉的这几行已经加入到下面并调整到合适的权重了
|
||||
# 〇 ling
|
||||
# 囧 jiong
|
||||
@@ -6296,6 +6297,7 @@ sort: by_weight
|
||||
哃 tong 11
|
||||
穜 tong 6
|
||||
鲖 tong 3
|
||||
侗 tong 1
|
||||
峒 tong 1
|
||||
洞 tong 1
|
||||
㛚 tong 0
|
||||
|
||||
+840
-314
File diff suppressed because it is too large
Load Diff
+1247
-94
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
#
|
||||
---
|
||||
name: others
|
||||
version: "2024-05-21"
|
||||
version: "2024-11-04"
|
||||
sort: by_weight
|
||||
...
|
||||
##### 容错词
|
||||
@@ -82,8 +82,6 @@ sort: by_weight
|
||||
主角 zhu jiao
|
||||
角色 jue se
|
||||
角色 jiao se
|
||||
比萨 bi sa
|
||||
比萨 pi sa
|
||||
比萨饼 bi sa bing
|
||||
比萨饼 pi sa bing
|
||||
吃比萨 chi bi sa
|
||||
@@ -228,6 +226,18 @@ sort: by_weight
|
||||
饮鸩止渴 yin jiu zhi ke
|
||||
饮鸩解渴 yin zhen jie ke
|
||||
饮鸩解渴 yin jiu jie ke
|
||||
宫商角徵羽 gong shang jue zhi yu
|
||||
宫商角徵羽 gong shang jiao zhi yu
|
||||
氙气灯 xian qi deng
|
||||
氙气灯 shan qi deng
|
||||
氙气大灯 xian qi da deng
|
||||
氙气大灯 shan qi da deng
|
||||
氙气手电筒 xian qi shou dian tong
|
||||
氙气手电筒 shan qi shou dian tong
|
||||
应该 ying gai
|
||||
应该 yin gai
|
||||
粘贴 zhan tie
|
||||
粘贴 nian tie
|
||||
### 错字
|
||||
曾经 ceng jing
|
||||
曾今 ceng jin
|
||||
@@ -250,6 +260,8 @@ sort: by_weight
|
||||
钜惠 ju hui
|
||||
摩羯座 mo jie zuo
|
||||
魔蝎座 mo xie zuo
|
||||
比萨 bi sa
|
||||
披萨 pi sa
|
||||
|
||||
|
||||
##### 叠字
|
||||
|
||||
+1224
-2129
File diff suppressed because it is too large
Load Diff
+9
-8
@@ -11,18 +11,19 @@ schema_list:
|
||||
# 可以直接删除或注释不需要的方案,对应的 *.schema.yaml 方案文件也可以直接删除
|
||||
# 除了 t9,它依赖于 rime_ice,用九宫格别删 rime_ice.schema.yaml
|
||||
- schema: rime_ice # 雾凇拼音(全拼)
|
||||
- schema: t9 # 九宫格(仓输入法)
|
||||
- schema: double_pinyin # 自然码双拼
|
||||
- schema: double_pinyin_abc # 智能 ABC 双拼
|
||||
- schema: double_pinyin_mspy # 微软双拼
|
||||
- schema: double_pinyin_sogou # 搜狗双拼
|
||||
- schema: double_pinyin_flypy # 小鹤双拼
|
||||
- schema: double_pinyin_ziguang # 紫光双拼
|
||||
- schema: japanese # 日语输入法
|
||||
# - schema: t9 # 九宫格(仓输入法)
|
||||
# - schema: double_pinyin # 自然码双拼
|
||||
# - schema: double_pinyin_abc # 智能 ABC 双拼
|
||||
# - schema: double_pinyin_mspy # 微软双拼
|
||||
# - schema: double_pinyin_sogou # 搜狗双拼
|
||||
# - schema: double_pinyin_flypy # 小鹤双拼
|
||||
# - schema: double_pinyin_ziguang # 紫光双拼
|
||||
|
||||
|
||||
# 菜单
|
||||
menu:
|
||||
page_size: 5 # 候选词个数
|
||||
page_size: 6 # 候选词个数
|
||||
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
|
||||
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin_abc # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin_flypy # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin_mspy # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin_sogou # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
@@ -127,7 +127,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -157,6 +157,7 @@ pin_cand_filter:
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
prism: double_pinyin_ziguang # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
|
||||
+24
-2
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gongwangip
|
||||
Web开发 Webkaifa
|
||||
Web开发 webkaifa
|
||||
圈X quanX
|
||||
圈X quanx
|
||||
Switch版 Switchban
|
||||
Switch版 switchban
|
||||
Switch版本 Switchbanben
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP renjungdp
|
||||
V8引擎 Vbayinqing
|
||||
V8引擎 vbayinqing
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 erGwangluo
|
||||
2G网络 ergwangluo
|
||||
3G网络 sanGwangluo
|
||||
3G网络 sangwangluo
|
||||
4G网络 siGwangluo
|
||||
4G网络 sigwangluo
|
||||
5G网络 wuGwangluo
|
||||
5G网络 wugwangluo
|
||||
3G流量 sanGliuliang
|
||||
3G流量 sangliuliang
|
||||
4G流量 siGliuliang
|
||||
4G流量 sigliuliang
|
||||
5G流量 wuGliuliang
|
||||
5G流量 wugliuliang
|
||||
3D打印 sanDdayin
|
||||
3D打印 sanddayin
|
||||
2D电影 erDdianying
|
||||
2D电影 erddianying
|
||||
3D电影 sanDdianying
|
||||
3D电影 sanddianying
|
||||
|
||||
+24
-2
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gswhip
|
||||
Web开发 Webklfa
|
||||
Web开发 webklfa
|
||||
圈X qpX
|
||||
圈X qpx
|
||||
Switch版 Switchbj
|
||||
Switch版 switchbj
|
||||
Switch版本 Switchbjbf
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rfjngdp
|
||||
V8引擎 Vbaycqy
|
||||
V8引擎 vbaycqy
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 orGwhlo
|
||||
2G网络 orgwhlo
|
||||
3G网络 sjGwhlo
|
||||
3G网络 sjgwhlo
|
||||
4G网络 siGwhlo
|
||||
4G网络 sigwhlo
|
||||
5G网络 wuGwhlo
|
||||
5G网络 wugwhlo
|
||||
3G流量 sjGlrlt
|
||||
3G流量 sjglrlt
|
||||
4G流量 siGlrlt
|
||||
4G流量 siglrlt
|
||||
5G流量 wuGlrlt
|
||||
5G流量 wuglrlt
|
||||
3D打印 sjDdayc
|
||||
3D打印 sjddayc
|
||||
2D电影 orDdwyy
|
||||
2D电影 orddwyy
|
||||
3D电影 sjDdwyy
|
||||
3D电影 sjddwyy
|
||||
|
||||
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gswhip
|
||||
Web开发 Webklfa
|
||||
Web开发 webklfa
|
||||
圈X qrX
|
||||
圈X qrx
|
||||
Switch版 Switchbj
|
||||
Switch版 switchbj
|
||||
Switch版本 Switchbjbf
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rfjpgdp
|
||||
V8引擎 Vbaynqy
|
||||
V8引擎 vbaynqy
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 erGwhlo
|
||||
2G网络 ergwhlo
|
||||
3G网络 sjGwhlo
|
||||
3G网络 sjgwhlo
|
||||
4G网络 siGwhlo
|
||||
4G网络 sigwhlo
|
||||
5G网络 wuGwhlo
|
||||
5G网络 wugwhlo
|
||||
3G流量 sjGlqld
|
||||
3G流量 sjglqld
|
||||
4G流量 siGlqld
|
||||
4G流量 siglqld
|
||||
5G流量 wuGlqld
|
||||
5G流量 wuglqld
|
||||
3D打印 sjDdayn
|
||||
3D打印 sjddayn
|
||||
2D电影 erDdmyy
|
||||
2D电影 erddmyy
|
||||
3D电影 sjDdmyy
|
||||
3D电影 sjddmyy
|
||||
|
||||
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gswhip
|
||||
Web开发 Webkdfa
|
||||
Web开发 webkdfa
|
||||
圈X qrX
|
||||
圈X qrx
|
||||
Switch版 Switchbj
|
||||
Switch版 switchbj
|
||||
Switch版本 Switchbjbf
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rfjygdp
|
||||
V8引擎 Vbaybqk
|
||||
V8引擎 vbaybqk
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 erGwhlo
|
||||
2G网络 ergwhlo
|
||||
3G网络 sjGwhlo
|
||||
3G网络 sjgwhlo
|
||||
4G网络 siGwhlo
|
||||
4G网络 sigwhlo
|
||||
5G网络 wuGwhlo
|
||||
5G网络 wugwhlo
|
||||
3G流量 sjGlqll
|
||||
3G流量 sjglqll
|
||||
4G流量 siGlqll
|
||||
4G流量 siglqll
|
||||
5G流量 wuGlqll
|
||||
5G流量 wuglqll
|
||||
3D打印 sjDdayb
|
||||
3D打印 sjddayb
|
||||
2D电影 erDdmyk
|
||||
2D电影 erddmyk
|
||||
3D电影 sjDdmyk
|
||||
3D电影 sjddmyk
|
||||
|
||||
+24
-2
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gswhip
|
||||
Web开发 Webklfa
|
||||
Web开发 webklfa
|
||||
圈X qrX
|
||||
圈X qrx
|
||||
Switch版 Switchbj
|
||||
Switch版 switchbj
|
||||
Switch版本 Switchbjbf
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rfjpgdp
|
||||
V8引擎 Vbaynq;
|
||||
V8引擎 vbaynq;
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 orGwhlo
|
||||
2G网络 orgwhlo
|
||||
3G网络 sjGwhlo
|
||||
3G网络 sjgwhlo
|
||||
4G网络 siGwhlo
|
||||
4G网络 sigwhlo
|
||||
5G网络 wuGwhlo
|
||||
5G网络 wugwhlo
|
||||
3G流量 sjGlqld
|
||||
3G流量 sjglqld
|
||||
4G流量 siGlqld
|
||||
4G流量 siglqld
|
||||
5G流量 wuGlqld
|
||||
5G流量 wuglqld
|
||||
3D打印 sjDdayn
|
||||
3D打印 sjddayn
|
||||
2D电影 orDdmy;
|
||||
2D电影 orddmy;
|
||||
3D电影 sjDdmy;
|
||||
3D电影 sjddmy;
|
||||
|
||||
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP gswhip
|
||||
Web开发 Webklfa
|
||||
Web开发 webklfa
|
||||
圈X qrX
|
||||
圈X qrx
|
||||
Switch版 Switchbj
|
||||
Switch版 switchbj
|
||||
Switch版本 Switchbjbf
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rfjpgdp
|
||||
V8引擎 Vbaynq;
|
||||
V8引擎 vbaynq;
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 orGwhlo
|
||||
2G网络 orgwhlo
|
||||
3G网络 sjGwhlo
|
||||
3G网络 sjgwhlo
|
||||
4G网络 siGwhlo
|
||||
4G网络 sigwhlo
|
||||
5G网络 wuGwhlo
|
||||
5G网络 wugwhlo
|
||||
3G流量 sjGlqld
|
||||
3G流量 sjglqld
|
||||
4G流量 siGlqld
|
||||
4G流量 siglqld
|
||||
5G流量 wuGlqld
|
||||
5G流量 wuglqld
|
||||
3D打印 sjDdayn
|
||||
3D打印 sjddayn
|
||||
2D电影 orDdmy;
|
||||
2D电影 orddmy;
|
||||
3D电影 sjDdmy;
|
||||
3D电影 sjddmy;
|
||||
|
||||
@@ -501,8 +501,6 @@ OK了吗 oklema
|
||||
公网IP ghwsip
|
||||
Web开发 Webkpfa
|
||||
Web开发 webkpfa
|
||||
圈X qlX
|
||||
圈X qlx
|
||||
Switch版 Switchbr
|
||||
Switch版 switchbr
|
||||
Switch版本 Switchbrbw
|
||||
@@ -912,3 +910,27 @@ O不OK obuok
|
||||
人均GDP rwjmgdp
|
||||
V8引擎 Vbayyq;
|
||||
V8引擎 vbayyq;
|
||||
4A级 siAji
|
||||
4A级 siaji
|
||||
5A级 wuAji
|
||||
5A级 wuaji
|
||||
2G网络 ojGwslo
|
||||
2G网络 ojgwslo
|
||||
3G网络 srGwslo
|
||||
3G网络 srgwslo
|
||||
4G网络 siGwslo
|
||||
4G网络 sigwslo
|
||||
5G网络 wuGwslo
|
||||
5G网络 wugwslo
|
||||
3G流量 srGljlg
|
||||
3G流量 srgljlg
|
||||
4G流量 siGljlg
|
||||
4G流量 sigljlg
|
||||
5G流量 wuGljlg
|
||||
5G流量 wugljlg
|
||||
3D打印 srDdayy
|
||||
3D打印 srddayy
|
||||
2D电影 ojDdfy;
|
||||
2D电影 ojddfy;
|
||||
3D电影 srDdfy;
|
||||
3D电影 srddfy;
|
||||
|
||||
+691
-604
File diff suppressed because it is too large
Load Diff
+106
-364
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
# nihong-hybrid.dict.yaml
|
||||
# encoding: utf-8
|
||||
|
||||
---
|
||||
name: japanese
|
||||
version: 'v0.2-20180411'
|
||||
|
||||
import_tables:
|
||||
- 'jp_dicts/japanese.mozc'
|
||||
- 'jp_dicts/japanese.jmdict'
|
||||
- 'jp_dicts/japanese.kana'
|
||||
...
|
||||
@@ -0,0 +1,444 @@
|
||||
# Rime schema
|
||||
# vim: set sw=2 sts=2 et:
|
||||
# encoding: utf-8
|
||||
|
||||
schema:
|
||||
schema_id: japanese
|
||||
name: 日本語
|
||||
version: 'v0.2'
|
||||
author:
|
||||
- ensigma96 <ensigma96@gmail.com>
|
||||
dependencies:
|
||||
- terra_pinyin.extended # for using reverse lookup
|
||||
- stroke
|
||||
|
||||
switches:
|
||||
- name: ascii_mode
|
||||
reset: 0
|
||||
states: [ 中文, 西文 ]
|
||||
- name: full_shape
|
||||
states: [ 半角, 全角 ]
|
||||
- name: simplification
|
||||
states: [ 漢字, 汉字 ]
|
||||
reset: 0
|
||||
#- options: [jp_variants, zh_simp, zh_tw ]
|
||||
#- options: [zh_simp, zh_tw ]
|
||||
# reset: 0
|
||||
# states:
|
||||
# #- 字形 → 日本
|
||||
# - 字形 → 大陸
|
||||
# - 字形 → 台灣
|
||||
- name: ascii_punct
|
||||
states: [ 。,, ., ]
|
||||
|
||||
engine:
|
||||
processors:
|
||||
- ascii_composer
|
||||
- recognizer
|
||||
- key_binder
|
||||
- speller
|
||||
- punctuator
|
||||
- selector
|
||||
- navigator
|
||||
- express_editor
|
||||
segmentors:
|
||||
- ascii_segmentor
|
||||
- matcher
|
||||
- abc_segmentor
|
||||
- affix_segmentor@putonghua_to_kanji_lookup
|
||||
- affix_segmentor@hannom_lookup
|
||||
- affix_segmentor@hanja_lookup
|
||||
- punct_segmentor
|
||||
- fallback_segmentor
|
||||
translators:
|
||||
- punct_translator
|
||||
- script_translator
|
||||
- reverse_lookup_translator
|
||||
- script_translator@putonghua_to_kanji_lookup
|
||||
- script_translator@hannom_lookup
|
||||
- script_translator@hanja_lookup
|
||||
filters:
|
||||
- simplifier
|
||||
#- simplifier@jp_variants
|
||||
#- simplifier@zh_simp
|
||||
#- simplifier@zh_tw
|
||||
- uniquifier
|
||||
- reverse_lookup_filter@putonghua_to_kanji_reverse_lookup
|
||||
- reverse_lookup_filter@hannom_reverse_lookup
|
||||
- reverse_lookup_filter@hanja_reverse_lookup
|
||||
|
||||
speller:
|
||||
alphabet: 'zyxwvutsrqponmlkjihgfedcba-_'
|
||||
delimiter: " '"
|
||||
algebra:
|
||||
- 'derive/_/x/'
|
||||
- 'derive/-/q/'
|
||||
# Add / remove rules the as you wish
|
||||
- 'derive/i_e/ye/'
|
||||
# - 'derive/fu/hu/'
|
||||
|
||||
translator:
|
||||
dictionary: japanese
|
||||
spelling_hints: 5
|
||||
comment_format:
|
||||
- 'xlit|q|ー|'
|
||||
preedit_format:
|
||||
- 'xlit|q|ー|'
|
||||
|
||||
putonghua_to_kanji_lookup:
|
||||
tag: putonghua_to_kanji_lookup
|
||||
prefix: "`" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
|
||||
dictionary: terra_pinyin.extended
|
||||
prism: td_pinyin_flypy
|
||||
preedit_format:
|
||||
- xform/([bpmfdtnljqx])n/$1iao/
|
||||
- xform/(\w)g/$1eng/
|
||||
- xform/(\w)q/$1iu/
|
||||
- xform/(\w)w/$1ei/
|
||||
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
|
||||
- xform/(\w)t/$1ve/
|
||||
- xform/(\w)y/$1un/
|
||||
- xform/([dtnlgkhvuirzcs])o/$1uo/
|
||||
- xform/(\w)p/$1ie/
|
||||
- xform/([jqx])s/$1iong/
|
||||
- xform/(\w)s/$1ong/
|
||||
- xform/(\w)d/$1ai/
|
||||
- xform/(\w)f/$1en/
|
||||
- xform/(\w)h/$1ang/
|
||||
- xform/(\w)j/$1an/
|
||||
- xform/([gkhvuirzcs])k/$1uai/
|
||||
- xform/(\w)k/$1ing/
|
||||
- xform/([jqxnl])l/$1iang/
|
||||
- xform/(\w)l/$1uang/
|
||||
- xform/(\w)z/$1ou/
|
||||
- xform/([gkhvuirzcs])x/$1ua/
|
||||
- xform/(\w)x/$1ia/
|
||||
- xform/(\w)c/$1ao/
|
||||
- xform/([dtgkhvuirzcs])v/$1ui/
|
||||
- xform/(\w)b/$1in/
|
||||
- xform/(\w)m/$1ian/
|
||||
- xform/([aoe])\1(\w)/$1$2/
|
||||
- "xform/(^|[ '])v/$1zh/"
|
||||
- "xform/(^|[ '])i/$1ch/"
|
||||
- "xform/(^|[ '])u/$1sh/"
|
||||
- xform/([nl])v/$1ü/
|
||||
- xform/([nl])ue/$1üe/
|
||||
- xform/([jqxy])v/$1u/
|
||||
- xform/eh/ê/
|
||||
- 'xform ([aeiou])(ng?|r)([-;/<,>\\.]) $1$3$2'
|
||||
- 'xform ([aeo])([iuo])([-;/<,>\\.]) $1$3$2'
|
||||
- 'xform a[-;] ā'
|
||||
- 'xform a/ á'
|
||||
- 'xform a[<,] ǎ'
|
||||
- 'xform a[>\\.] à'
|
||||
- 'xform e[-;] ē'
|
||||
- 'xform e/ é'
|
||||
- 'xform e[<,] ě'
|
||||
- 'xform e[>\\.] è'
|
||||
- 'xform o[-;] ō'
|
||||
- 'xform o/ ó'
|
||||
- 'xform o[<,] ǒ'
|
||||
- 'xform o[>\\.] ò'
|
||||
- 'xform i[-;] ī'
|
||||
- 'xform i/ í'
|
||||
- 'xform i[<,] ǐ'
|
||||
- 'xform i[>\\.] ì'
|
||||
- 'xform u[-;] ū'
|
||||
- 'xform u/ ú'
|
||||
- 'xform u[<,] ǔ'
|
||||
- 'xform u[>\\.] ù'
|
||||
- 'xform ü[-;] ǖ'
|
||||
- 'xform ü/ ǘ'
|
||||
- 'xform ü[<,] ǚ'
|
||||
- 'xform ü[>\\.] ǜ'
|
||||
comment_format:
|
||||
- xform ([aeiou])(ng?|r)([1234]) $1$3$2
|
||||
- xform ([aeo])([iuo])([1234]) $1$3$2
|
||||
- xform a1 ā
|
||||
- xform a2 á
|
||||
- xform a3 ǎ
|
||||
- xform a4 à
|
||||
- xform e1 ē
|
||||
- xform e2 é
|
||||
- xform e3 ě
|
||||
- xform e4 è
|
||||
- xform o1 ō
|
||||
- xform o2 ó
|
||||
- xform o3 ǒ
|
||||
- xform o4 ò
|
||||
- xform i1 ī
|
||||
- xform i2 í
|
||||
- xform i3 ǐ
|
||||
- xform i4 ì
|
||||
- xform u1 ū
|
||||
- xform u2 ú
|
||||
- xform u3 ǔ
|
||||
- xform u4 ù
|
||||
- xform v1 ǖ
|
||||
- xform v2 ǘ
|
||||
- xform v3 ǚ
|
||||
- xform v4 ǜ
|
||||
- xform/([nljqxy])v/$1ü/
|
||||
- xform/eh[0-5]?/ê/
|
||||
- xform/([a-z]+)[0-5]/$1/
|
||||
tips: 【普查日】
|
||||
#closing_tips: 【粵拼】
|
||||
|
||||
putonghua_to_kanji_reverse_lookup:
|
||||
tags: [ putonghua_to_kanji_lookup ]
|
||||
dictionary: japanese
|
||||
spelling_hints: 10
|
||||
comment_format:
|
||||
- 'xlit|q|ー|'
|
||||
preedit_format:
|
||||
- 'xlit|q|ー|'
|
||||
|
||||
# simplifier:
|
||||
# option_name: jp_variants
|
||||
# opencc_config: jp_t2s.json
|
||||
|
||||
reverse_lookup:
|
||||
dictionary: stroke
|
||||
enable_completion: true
|
||||
prefix: "`H"
|
||||
suffix: "`"
|
||||
tips: 〔筆畫〕
|
||||
preedit_format:
|
||||
- xlit/hspnz/一丨丿丶乙/
|
||||
comment_format:
|
||||
- 'xlit|q|ー|'
|
||||
|
||||
hannom_lookup:
|
||||
tag: hannom_lookup
|
||||
prefix: "`V" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
|
||||
suffix: "`"
|
||||
dictionary: hannomPS
|
||||
preedit_format:
|
||||
- 'xform ([aeiouâăôê])(ng|nh|ch)([sfjxr]) $1$3$2'
|
||||
- 'xform ([aeiouâăôê])([iunptcmy])([sfjxr]) $1$3$2'
|
||||
- 'xform ([ae])([ou])([sfjxr]) $1$3$2'
|
||||
- 'xform (aw|ow|uw)([iunptcmy])([sfjxr]) $1$3$2'
|
||||
- 'xform (aw|ow|uw)(ng|nh|ch)([sfjxr]) $1$3$2'
|
||||
- 'xform z '
|
||||
#- 'xform , '
|
||||
- 'xform A '
|
||||
- 'xform dd đ'
|
||||
- 'xform aa â'
|
||||
- 'xform âs ấ'
|
||||
- 'xform âf ầ'
|
||||
- 'xform âj ậ'
|
||||
- 'xform âx ẫ'
|
||||
- 'xform âr ẩ'
|
||||
- 'xform aw ă'
|
||||
- 'xform ăs ắ'
|
||||
- 'xform ăf ằ'
|
||||
- 'xform ăj ặ'
|
||||
- 'xform ăx ẵ'
|
||||
- 'xform ăr ẳ'
|
||||
- 'xform oo ô'
|
||||
- 'xform ôs ố'
|
||||
- 'xform ôf ồ'
|
||||
- 'xform ôj ộ'
|
||||
- 'xform ôx ỗ'
|
||||
- 'xform ôr ổ'
|
||||
- 'xform ee ê'
|
||||
- 'xform ês ế'
|
||||
- 'xform êf ề'
|
||||
- 'xform êj ệ'
|
||||
- 'xform êx ễ'
|
||||
- 'xform êr ể'
|
||||
- 'xform uw ư'
|
||||
- 'xform ưs ứ'
|
||||
- 'xform ưf ừ'
|
||||
- 'xform ưj ự'
|
||||
- 'xform ưx ữ'
|
||||
- 'xform ưr ử'
|
||||
- 'xform ow ơ'
|
||||
- 'xform ơs ớ'
|
||||
- 'xform ơf ờ'
|
||||
- 'xform ơj ợ'
|
||||
- 'xform ơx ỡ'
|
||||
- 'xform ơr ở'
|
||||
- 'xform as á'
|
||||
- 'xform af à'
|
||||
- 'xform aj ạ'
|
||||
- 'xform ax ã'
|
||||
- 'xform ar ả'
|
||||
- 'xform is í'
|
||||
- 'xform if ì'
|
||||
- 'xform ij ị'
|
||||
- 'xform ix ĩ'
|
||||
- 'xform ir ỉ'
|
||||
- 'xform us ú'
|
||||
- 'xform uf ù'
|
||||
- 'xform uj ụ'
|
||||
- 'xform ux ũ'
|
||||
- 'xform ur ủ'
|
||||
- 'xform es é'
|
||||
- 'xform ef è'
|
||||
- 'xform ej ẹ'
|
||||
- 'xform ex ẽ'
|
||||
- 'xform er ẻ'
|
||||
- 'xform os ó'
|
||||
- 'xform of ò'
|
||||
- 'xform oj ọ'
|
||||
- 'xform ox õ'
|
||||
- 'xform or ỏ'
|
||||
- 'xform ys ý'
|
||||
- 'xform yf ỳ'
|
||||
- 'xform yj ỵ'
|
||||
- 'xform yx ỹ'
|
||||
- 'xform yr ỷ'
|
||||
tips: 【越】
|
||||
|
||||
hannom_reverse_lookup:
|
||||
tags: [ hannom_lookup ]
|
||||
dictionary: hannomPS
|
||||
comment_format:
|
||||
- 'xform ([aeiouâăôê])(ng|nh|ch)([sfjxr]) $1$3$2'
|
||||
- 'xform ([aeiouâăôê])([iunptcmy])([sfjxr]) $1$3$2'
|
||||
- 'xform ([ae])([ou])([sfjxr]) $1$3$2'
|
||||
- 'xform (aw|ow|uw)([iunptcmy])([sfjxr]) $1$3$2'
|
||||
- 'xform (aw|ow|uw)(ng|nh|ch)([sfjxr]) $1$3$2'
|
||||
# - 'xform z ,【𡨸標準】'
|
||||
# - 'xform , ,【𡨸異體】'
|
||||
- 'xform z '
|
||||
- 'xform dd đ'
|
||||
- 'xform aa â'
|
||||
- 'xform âs ấ'
|
||||
- 'xform âf ầ'
|
||||
- 'xform âj ậ'
|
||||
- 'xform âx ẫ'
|
||||
- 'xform âr ẩ'
|
||||
- 'xform aw ă'
|
||||
- 'xform ăs ắ'
|
||||
- 'xform ăf ằ'
|
||||
- 'xform ăj ặ'
|
||||
- 'xform ăx ẵ'
|
||||
- 'xform ăr ẳ'
|
||||
- 'xform oo ô'
|
||||
- 'xform ôs ố'
|
||||
- 'xform ôf ồ'
|
||||
- 'xform ôj ộ'
|
||||
- 'xform ôx ỗ'
|
||||
- 'xform ôr ổ'
|
||||
- 'xform ee ê'
|
||||
- 'xform ês ế'
|
||||
- 'xform êf ề'
|
||||
- 'xform êj ệ'
|
||||
- 'xform êx ễ'
|
||||
- 'xform êr ể'
|
||||
- 'xform uw ư'
|
||||
- 'xform ưs ứ'
|
||||
- 'xform ưf ừ'
|
||||
- 'xform ưj ự'
|
||||
- 'xform ưx ữ'
|
||||
- 'xform ưr ử'
|
||||
- 'xform ow ơ'
|
||||
- 'xform ơs ớ'
|
||||
- 'xform ơf ờ'
|
||||
- 'xform ơj ợ'
|
||||
- 'xform ơx ỡ'
|
||||
- 'xform ơr ở'
|
||||
- 'xform as á'
|
||||
- 'xform af à'
|
||||
- 'xform aj ạ'
|
||||
- 'xform ax ã'
|
||||
- 'xform ar ả'
|
||||
- 'xform is í'
|
||||
- 'xform if ì'
|
||||
- 'xform ij ị'
|
||||
- 'xform ix ĩ'
|
||||
- 'xform ir ỉ'
|
||||
- 'xform us ú'
|
||||
- 'xform uf ù'
|
||||
- 'xform uj ụ'
|
||||
- 'xform ux ũ'
|
||||
- 'xform ur ủ'
|
||||
- 'xform es é'
|
||||
- 'xform ef è'
|
||||
- 'xform ej ẹ'
|
||||
- 'xform ex ẽ'
|
||||
- 'xform er ẻ'
|
||||
- 'xform os ó'
|
||||
- 'xform of ò'
|
||||
- 'xform oj ọ'
|
||||
- 'xform ox õ'
|
||||
- 'xform or ỏ'
|
||||
- 'xform ys ý'
|
||||
- 'xform yf ỳ'
|
||||
- 'xform yj ỵ'
|
||||
- 'xform yx ỹ'
|
||||
- 'xform yr ỷ'
|
||||
#closing_tips: 【粵拼】
|
||||
|
||||
hanja_lookup:
|
||||
tag: hanja_lookup
|
||||
prefix: "`K" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
|
||||
suffix: "`"
|
||||
dictionary: "hangyl"
|
||||
preedit_format:
|
||||
- xform/'/ /
|
||||
- xform/(^|[ '])([qx])/$1/
|
||||
- xform/([qx])/ng/
|
||||
tips: 【韓】
|
||||
|
||||
hanja_reverse_lookup:
|
||||
tags: [ hanja_lookup ]
|
||||
dictionary: "hangyl"
|
||||
comment_format:
|
||||
- xform/(^|[ '])q/$1/
|
||||
- xform/q/ng/
|
||||
|
||||
punctuator:
|
||||
import_preset: default
|
||||
|
||||
key_binder:
|
||||
bindings:
|
||||
- {accept: "Control+Shift+1", select: .next, when: always}
|
||||
- {accept: "Control+Shift+n", select: japanese, when: always}
|
||||
- {accept: "Control+Shift+N", select: japanese, when: always}
|
||||
- {accept: "Control+Shift+k", select: korean, when: always}
|
||||
- {accept: "Control+Shift+K", select: korean, when: always}
|
||||
- {accept: "Control+Shift+v", select: vietnamese, when: always}
|
||||
- {accept: "Control+Shift+V", select: vietnamese, when: always}
|
||||
- {accept: "Control+Shift+j", select: double_jyutping_extra, when: always}
|
||||
- {accept: "Control+Shift+J", select: double_jyutping_extra, when: always}
|
||||
- {accept: "Control+Shift+m", select: td_pinyin_flypy_extra, when: always}
|
||||
- {accept: "Control+Shift+M", select: td_pinyin_flypy_extra, when: always}
|
||||
- {accept: "Control+Shift+l", select: international, when: always}
|
||||
- {accept: "Control+Shift+L", select: international, when: always}
|
||||
- {accept: "F16", select: .next, when: always}
|
||||
- {accept: "F19", select: international, when: always}
|
||||
# [] Pagination
|
||||
- {accept: bracketleft, send: Page_Up , when: has_menu}
|
||||
- {accept: bracketright, send: Page_Down , when: has_menu}
|
||||
|
||||
recognizer:
|
||||
import_preset: default
|
||||
patterns:
|
||||
reverse_lookup: "`H[a-z]*`?$"
|
||||
putonghua_to_kanji_lookup: "`[a-z;/,.]*`?$"
|
||||
hannom_lookup: "`V[a-z]*?$"
|
||||
hanja_lookup: "`K[a-z]*?$"
|
||||
|
||||
#zh_jp:
|
||||
# option_name: zh_jp
|
||||
# opencc_config: jp_t2s.json
|
||||
# #tips: all
|
||||
# tips: none
|
||||
|
||||
# zh_simp:
|
||||
# option_name: zh_simp
|
||||
# opencc_config: t2s.json
|
||||
# tips: none
|
||||
|
||||
# zh_tw:
|
||||
# option_name: zh_tw
|
||||
# opencc_config: t2tw.json
|
||||
# tips: none
|
||||
|
||||
# jp_variants:
|
||||
# option_name: jp_variants
|
||||
# opencc_config: jp_t2s.json
|
||||
# tips: none
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,620 @@
|
||||
# encoding: utf-8
|
||||
# vim: set noet:
|
||||
|
||||
---
|
||||
name: japanese.kana
|
||||
version: 'v0.2-20180411'
|
||||
sort: by_weight
|
||||
...
|
||||
|
||||
# Mostly based on the Hepburn romanization system
|
||||
|
||||
# Small forms
|
||||
ぁ _a
|
||||
ぃ _i
|
||||
ぅ _u
|
||||
ぇ _e
|
||||
ぉ _o
|
||||
ゃ _ya
|
||||
ゅ _yu
|
||||
ょ _yo
|
||||
ゎ _wa
|
||||
ゕ _ka
|
||||
ゖ _ke
|
||||
っ _tsu
|
||||
|
||||
ァ _a
|
||||
ィ _i
|
||||
ゥ _u
|
||||
ェ _e
|
||||
ォ _o
|
||||
ャ _ya
|
||||
ュ _yu
|
||||
ョ _yo
|
||||
ヮ _wa
|
||||
ヵ _ka
|
||||
ヶ _ke
|
||||
ッ _tsu
|
||||
|
||||
# Gojuuon 五十音
|
||||
あ a
|
||||
い i
|
||||
う u
|
||||
え e
|
||||
お o
|
||||
ゔ vu
|
||||
か ka
|
||||
き ki
|
||||
く ku
|
||||
け ke
|
||||
こ ko
|
||||
が ga
|
||||
ぎ gi
|
||||
ぐ gu
|
||||
げ ge
|
||||
ご go
|
||||
さ sa
|
||||
し shi
|
||||
す su
|
||||
せ se
|
||||
そ so
|
||||
ざ za
|
||||
じ ji
|
||||
ず zu
|
||||
ぜ ze
|
||||
ぞ zo
|
||||
た ta
|
||||
ち chi
|
||||
つ tsu
|
||||
て te
|
||||
と to
|
||||
だ da
|
||||
ぢ ji
|
||||
づ zu
|
||||
で de
|
||||
ど do
|
||||
な na
|
||||
に ni
|
||||
ぬ nu
|
||||
ね ne
|
||||
の no
|
||||
は ha
|
||||
ひ hi
|
||||
ふ fu
|
||||
へ he
|
||||
ほ ho
|
||||
ば ba
|
||||
び bi
|
||||
ぶ bu
|
||||
べ be
|
||||
ぼ bo
|
||||
ぱ pa
|
||||
ぴ pi
|
||||
ぷ pu
|
||||
ぺ pe
|
||||
ぽ po
|
||||
ま ma
|
||||
み mi
|
||||
む mu
|
||||
め me
|
||||
も mo
|
||||
や ya
|
||||
ゆ yu
|
||||
よ yo
|
||||
ら ra
|
||||
り ri
|
||||
る ru
|
||||
れ re
|
||||
ろ ro
|
||||
わ wa
|
||||
ゐ wi
|
||||
ゑ we
|
||||
を wo
|
||||
ん n
|
||||
|
||||
ア a
|
||||
イ i
|
||||
ウ u
|
||||
エ e
|
||||
オ o
|
||||
ヴ vu
|
||||
カ ka
|
||||
キ ki
|
||||
ク ku
|
||||
ケ ke
|
||||
コ ko
|
||||
ガ ga
|
||||
ギ gi
|
||||
グ gu
|
||||
ゲ ge
|
||||
ゴ go
|
||||
サ sa
|
||||
シ shi
|
||||
ス su
|
||||
セ se
|
||||
ソ so
|
||||
ザ za
|
||||
ジ ji
|
||||
ズ zu
|
||||
ゼ ze
|
||||
ゾ zo
|
||||
タ ta
|
||||
チ chi
|
||||
ツ tsu
|
||||
テ te
|
||||
ト to
|
||||
ダ da
|
||||
ヂ ji
|
||||
ヅ zu
|
||||
デ de
|
||||
ド do
|
||||
ナ na
|
||||
ニ ni
|
||||
ヌ nu
|
||||
ネ ne
|
||||
ノ no
|
||||
ハ ha
|
||||
ヒ hi
|
||||
フ fu
|
||||
ヘ he
|
||||
ホ ho
|
||||
バ ba
|
||||
ビ bi
|
||||
ブ bu
|
||||
ベ be
|
||||
ボ bo
|
||||
パ pa
|
||||
ピ pi
|
||||
プ pu
|
||||
ペ pe
|
||||
ポ po
|
||||
マ ma
|
||||
ミ mi
|
||||
ム mu
|
||||
メ me
|
||||
モ mo
|
||||
ヤ ya
|
||||
ユ yu
|
||||
ヨ yo
|
||||
ラ ra
|
||||
リ ri
|
||||
ル ru
|
||||
レ re
|
||||
ロ ro
|
||||
ワ wa
|
||||
ヰ wi
|
||||
ヱ we
|
||||
ヲ wo
|
||||
ン n
|
||||
|
||||
# Youon 拗音
|
||||
うぁ wha
|
||||
うぃ whi
|
||||
うぇ whe
|
||||
うぉ who
|
||||
ゔぁ va
|
||||
ゔぃ vi
|
||||
ゔぇ ve
|
||||
ゔぉ vo
|
||||
ゔゃ vya
|
||||
ゔゅ vyu
|
||||
ゔょ vyo
|
||||
きゃ kya
|
||||
きゅ kyu
|
||||
きょ kyo
|
||||
くぁ kwa
|
||||
くぃ kwi
|
||||
くぇ kwe
|
||||
くぉ kwo
|
||||
くゎ kwa
|
||||
ぎゃ gya
|
||||
ぎゅ gyu
|
||||
ぎょ gyo
|
||||
ぐぁ gwa
|
||||
ぐぃ gwi
|
||||
ぐぇ gwe
|
||||
ぐぉ gwo
|
||||
ぐゎ gwa
|
||||
しぇ she
|
||||
しゃ sha
|
||||
しゅ shu
|
||||
しょ sho
|
||||
すぃ si
|
||||
じぇ je
|
||||
じゃ ja
|
||||
じゅ ju
|
||||
じょ jo
|
||||
ずぃ zi
|
||||
ちぇ che
|
||||
ちゃ cha
|
||||
ちゅ chu
|
||||
ちょ cho
|
||||
つぁ tsa
|
||||
つぃ tsi
|
||||
つぇ tse
|
||||
つぉ tso
|
||||
てぃ ti
|
||||
てゃ tya
|
||||
てゅ tyu
|
||||
てょ tyo
|
||||
とぅ tu
|
||||
ぢぇ je
|
||||
ぢゃ ja
|
||||
ぢゅ ju
|
||||
ぢょ jo
|
||||
でぃ di
|
||||
でゃ dya
|
||||
でゅ dyu
|
||||
でょ dyo
|
||||
どぅ du
|
||||
にゃ nya
|
||||
にゅ nyu
|
||||
にょ nyo
|
||||
ひゃ hya
|
||||
ひゅ hyu
|
||||
ひょ hyo
|
||||
ふぁ fa
|
||||
ふぃ fi
|
||||
ふぇ fe
|
||||
ふぉ fo
|
||||
ふゃ fya
|
||||
ふゅ fyu
|
||||
ふょ fyo
|
||||
ほぅ hu
|
||||
びゃ bya
|
||||
びゅ byu
|
||||
びょ byo
|
||||
ぴゃ pya
|
||||
ぴゅ pyu
|
||||
ぴょ pyo
|
||||
みゃ mya
|
||||
みゅ myu
|
||||
みょ myo
|
||||
りゃ rya
|
||||
りゅ ryu
|
||||
りょ ryo
|
||||
|
||||
ウァ wha
|
||||
ウィ whi
|
||||
ウェ whe
|
||||
ウォ who
|
||||
ヴァ va
|
||||
ヴィ vi
|
||||
ヴェ ve
|
||||
ヴォ vo
|
||||
ヴャ vya
|
||||
ヴュ vyu
|
||||
ヴョ vyo
|
||||
キャ kya
|
||||
キュ kyu
|
||||
キョ kyo
|
||||
クァ kwa
|
||||
クィ kwi
|
||||
クェ kwe
|
||||
クォ kwo
|
||||
クヮ kwa
|
||||
ギャ gya
|
||||
ギュ gyu
|
||||
ギョ gyo
|
||||
グァ gwa
|
||||
グィ gwi
|
||||
グェ gwe
|
||||
グォ gwo
|
||||
グヮ gwa
|
||||
シェ she
|
||||
シャ sha
|
||||
シュ shu
|
||||
ショ sho
|
||||
スィ si
|
||||
ジェ je
|
||||
ジャ ja
|
||||
ジュ ju
|
||||
ジョ jo
|
||||
ズィ zi
|
||||
チェ che
|
||||
チャ cha
|
||||
チュ chu
|
||||
チョ cho
|
||||
ツァ tsa
|
||||
ツィ tsi
|
||||
ツェ tse
|
||||
ツォ tso
|
||||
ティ ti
|
||||
テャ tya
|
||||
テュ tyu
|
||||
テョ tyo
|
||||
トゥ tu
|
||||
ヂェ je
|
||||
ヂャ ja
|
||||
ヂュ ju
|
||||
ヂョ jo
|
||||
ディ di
|
||||
デャ dya
|
||||
デュ dyu
|
||||
デョ dyo
|
||||
ドゥ du
|
||||
ニャ nya
|
||||
ニュ nyu
|
||||
ニョ nyo
|
||||
ヒャ hya
|
||||
ヒュ hyu
|
||||
ヒョ hyo
|
||||
ファ fa
|
||||
フィ fi
|
||||
フェ fe
|
||||
フォ fo
|
||||
フャ fya
|
||||
フュ fyu
|
||||
フョ fyo
|
||||
ホゥ hu
|
||||
ビャ bya
|
||||
ビュ byu
|
||||
ビョ byo
|
||||
ピャ pya
|
||||
ピュ pyu
|
||||
ピョ pyo
|
||||
ミャ mya
|
||||
ミュ myu
|
||||
ミョ myo
|
||||
リャ rya
|
||||
リュ ryu
|
||||
リョ ryo
|
||||
|
||||
# Sokuon 促音
|
||||
っゔ vvu
|
||||
っか kka
|
||||
っき kki
|
||||
っく kku
|
||||
っけ kke
|
||||
っこ kko
|
||||
っが gga
|
||||
っぎ ggi
|
||||
っぐ ggu
|
||||
っげ gge
|
||||
っご ggo
|
||||
っさ ssa
|
||||
っし sshi
|
||||
っす ssu
|
||||
っせ sse
|
||||
っそ sso
|
||||
っざ zza
|
||||
っじ jji
|
||||
っず zzu
|
||||
っぜ zze
|
||||
っぞ zzo
|
||||
った tta
|
||||
っち tchi
|
||||
っつ ttsu
|
||||
って tte
|
||||
っと tto
|
||||
っだ dda
|
||||
っぢ jji
|
||||
っづ zzu
|
||||
っで dde
|
||||
っど ddo
|
||||
っは hha
|
||||
っひ hhi
|
||||
っふ ffu
|
||||
っへ hhe
|
||||
っほ hho
|
||||
っば bba
|
||||
っび bbi
|
||||
っぶ bbu
|
||||
っべ bbe
|
||||
っぼ bbo
|
||||
っぱ ppa
|
||||
っぴ ppi
|
||||
っぷ ppu
|
||||
っぺ ppe
|
||||
っぽ ppo
|
||||
っら rra
|
||||
っり rri
|
||||
っる rru
|
||||
っれ rre
|
||||
っろ rro
|
||||
|
||||
ッヴ vvu
|
||||
ッカ kka
|
||||
ッキ kki
|
||||
ック kku
|
||||
ッケ kke
|
||||
ッコ kko
|
||||
ッガ gga
|
||||
ッギ ggi
|
||||
ッグ ggu
|
||||
ッゲ gge
|
||||
ッゴ ggo
|
||||
ッサ ssa
|
||||
ッシ sshi
|
||||
ッス ssu
|
||||
ッセ sse
|
||||
ッソ sso
|
||||
ッザ zza
|
||||
ッジ jji
|
||||
ッズ zzu
|
||||
ッゼ zze
|
||||
ッゾ zzo
|
||||
ッタ tta
|
||||
ッチ tchi
|
||||
ッツ ttsu
|
||||
ッテ tte
|
||||
ット tto
|
||||
ッダ dda
|
||||
ッヂ jji
|
||||
ッヅ zzu
|
||||
ッデ dde
|
||||
ッド ddo
|
||||
ッハ hha
|
||||
ッヒ hhi
|
||||
ッフ ffu
|
||||
ッヘ hhe
|
||||
ッホ hho
|
||||
ッバ bba
|
||||
ッビ bbi
|
||||
ッブ bbu
|
||||
ッベ bbe
|
||||
ッボ bbo
|
||||
ッパ ppa
|
||||
ッピ ppi
|
||||
ップ ppu
|
||||
ッペ ppe
|
||||
ッポ ppo
|
||||
ッラ rra
|
||||
ッリ rri
|
||||
ッル rru
|
||||
ッレ rre
|
||||
ッロ rro
|
||||
|
||||
# Youon with sokuon
|
||||
っゔぁ vva
|
||||
っゔぃ vvi
|
||||
っゔぇ vve
|
||||
っゔぉ vvo
|
||||
っゔゃ vvya
|
||||
っゔゅ vvyu
|
||||
っゔょ vvyo
|
||||
っきゃ kkya
|
||||
っきゅ kkyu
|
||||
っきょ kkyo
|
||||
っくぁ kkwa
|
||||
っくぃ kkwi
|
||||
っくぇ kkwe
|
||||
っくぉ kkwo
|
||||
っくゎ kkwa
|
||||
っぎゃ ggya
|
||||
っぎゅ ggyu
|
||||
っぎょ ggyo
|
||||
っぐぁ ggwa
|
||||
っぐぃ ggwi
|
||||
っぐぇ ggwe
|
||||
っぐぉ ggwo
|
||||
っぐゎ ggwa
|
||||
っしぇ sshe
|
||||
っしゃ ssha
|
||||
っしゅ sshu
|
||||
っしょ ssho
|
||||
っすぃ ssi
|
||||
っじぇ jje
|
||||
っじゃ jja
|
||||
っじゅ jju
|
||||
っじょ jjo
|
||||
っずぃ zzi
|
||||
っちぇ tche
|
||||
っちゃ tcha
|
||||
っちゅ tchu
|
||||
っちょ tcho
|
||||
っつぁ ttsa
|
||||
っつぃ ttsi
|
||||
っつぇ ttse
|
||||
っつぉ ttso
|
||||
ってぃ tti
|
||||
ってゃ ttya
|
||||
ってゅ ttyu
|
||||
ってょ ttyo
|
||||
っとぅ ttu
|
||||
っぢぇ jje
|
||||
っぢゃ jja
|
||||
っぢゅ jju
|
||||
っぢょ jjo
|
||||
っでぃ ddi
|
||||
っでゃ ddya
|
||||
っでゅ ddyu
|
||||
っでょ ddyo
|
||||
っどぅ ddu
|
||||
っひゃ hhya
|
||||
っひゅ hhyu
|
||||
っひょ hhyo
|
||||
っふぁ ffa
|
||||
っふぃ ffi
|
||||
っふぇ ffe
|
||||
っふぉ ffo
|
||||
っふゃ ffya
|
||||
っふゅ ffyu
|
||||
っふょ ffyo
|
||||
っほぅ hhu
|
||||
っびゃ bbya
|
||||
っびゅ bbyu
|
||||
っびょ bbyo
|
||||
っぴゃ ppya
|
||||
っぴゅ ppyu
|
||||
っぴょ ppyo
|
||||
っりゃ rrya
|
||||
っりゅ rryu
|
||||
っりょ rryo
|
||||
|
||||
ッヴァ vva
|
||||
ッヴィ vvi
|
||||
ッヴェ vve
|
||||
ッヴォ vvo
|
||||
ッヴャ vvya
|
||||
ッヴュ vvyu
|
||||
ッヴョ vvyo
|
||||
ッキャ kkya
|
||||
ッキュ kkyu
|
||||
ッキョ kkyo
|
||||
ックァ kkwa
|
||||
ックィ kkwi
|
||||
ックェ kkwe
|
||||
ックォ kkwo
|
||||
ックヮ kkwa
|
||||
ッギャ ggya
|
||||
ッギュ ggyu
|
||||
ッギョ ggyo
|
||||
ッグァ ggwa
|
||||
ッグィ ggwi
|
||||
ッグェ ggwe
|
||||
ッグォ ggwo
|
||||
ッグヮ ggwa
|
||||
ッシェ sshe
|
||||
ッシャ ssha
|
||||
ッシュ sshu
|
||||
ッショ ssho
|
||||
ッスィ ssi
|
||||
ッジェ jje
|
||||
ッジャ jja
|
||||
ッジュ jju
|
||||
ッジョ jjo
|
||||
ッズィ zzi
|
||||
ッチェ tche
|
||||
ッチャ tcha
|
||||
ッチュ tchu
|
||||
ッチョ tcho
|
||||
ッツァ ttsa
|
||||
ッツィ ttsi
|
||||
ッツェ ttse
|
||||
ッツォ ttso
|
||||
ッティ tti
|
||||
ッテャ ttya
|
||||
ッテュ ttyu
|
||||
ッテョ ttyo
|
||||
ットゥ ttu
|
||||
ッヂェ jje
|
||||
ッヂャ jja
|
||||
ッヂュ jju
|
||||
ッヂョ jjo
|
||||
ッディ ddi
|
||||
ッデャ ddya
|
||||
ッデュ ddyu
|
||||
ッデョ ddyo
|
||||
ッドゥ ddu
|
||||
ッヒャ hhya
|
||||
ッヒュ hhyu
|
||||
ッヒョ hhyo
|
||||
ッファ ffa
|
||||
ッフィ ffi
|
||||
ッフェ ffe
|
||||
ッフォ ffo
|
||||
ッフャ ffya
|
||||
ッフュ ffyu
|
||||
ッフョ ffyo
|
||||
ッホゥ hhu
|
||||
ッビャ bbya
|
||||
ッビュ bbyu
|
||||
ッビョ bbyo
|
||||
ッピャ ppya
|
||||
ッピュ ppyu
|
||||
ッピョ ppyo
|
||||
ッリャ rrya
|
||||
ッリュ rryu
|
||||
ッリョ rryo
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,92 +0,0 @@
|
||||
#! /usr/bin/env lua
|
||||
--
|
||||
-- debugtool.lua
|
||||
-- Copyright (C) 2021 Shewer Lu <shewer@gmail.com>
|
||||
--
|
||||
-- Distributed under terms of the MIT license.
|
||||
--
|
||||
-- puts(tag,...)
|
||||
-- DEBUG --> log.error
|
||||
-- WARN --> log.warning
|
||||
-- INFO --> log.info
|
||||
-- CONSOLE --> print
|
||||
--
|
||||
-- ex:
|
||||
-- test.lua
|
||||
--
|
||||
-- local puts = require 'tools/debugtool'
|
||||
-- --set tag D103 C102
|
||||
-- local D103= DEBUG .. "103"
|
||||
-- local C102= CONSOLE .. "102"
|
||||
-- local C103= nil
|
||||
--
|
||||
--
|
||||
-- puts(ERROR,__FILE__(),__LINE__(),__FUNC__(), 1, 2 , 3 )
|
||||
-- --> log.error( "error" .. tran_msg(...))
|
||||
--
|
||||
-- puts(DEBUG,__FILE__(),__LINE__(),__FUNC__(), 1, 2 , 3 )
|
||||
-- --> log.error( DEBUG .. tran_msg(...))
|
||||
--
|
||||
-- puts(D103,__FILE__(),__LINE__(),__FUNC__(), 1 2 3)
|
||||
-- --> log.error("trace103" .. tran_msg(...)
|
||||
--
|
||||
-- puts(C102,__FILE__(),__LINE__(),__FUNC__(), 1 2 3)
|
||||
-- --> print("console103" .. tran_msg(...)
|
||||
--
|
||||
-- puts(C103,__FILE__(),__LINE__(),__FUNC__(), 1 2 3)
|
||||
-- --> pass
|
||||
--
|
||||
--
|
||||
--
|
||||
-- puts(DEBUG,__FILE__(),__LINE__(),__FUNC__() , ...)
|
||||
-- puts(INFO,__FILE__(),__LINE__(),__FUNC__() , ...)
|
||||
--
|
||||
-- global variable
|
||||
function __FILE__(n)
|
||||
n = n or 2
|
||||
return debug.getinfo(n, 'S').source
|
||||
end
|
||||
|
||||
function __LINE__(n)
|
||||
n = n or 2
|
||||
return debug.getinfo(n, 'l').currentline
|
||||
end
|
||||
|
||||
function __FUNC__(n)
|
||||
n = n or 2
|
||||
return debug.getinfo(n, 'n').name
|
||||
end
|
||||
|
||||
INFO = "log"
|
||||
WARN = "warn"
|
||||
ERROR = "error"
|
||||
DEBUG = "trace"
|
||||
CONSOLE = "console"
|
||||
|
||||
|
||||
|
||||
|
||||
local function tran_msg(...)
|
||||
local msg = "\t"
|
||||
for i, k in next, { ... } do msg = msg .. ": " .. tostring(k) end
|
||||
return msg
|
||||
end
|
||||
local function puts(tag, ...)
|
||||
if type(tag) ~= "string" then return end
|
||||
|
||||
if INFO and tag:match("^" .. INFO) then
|
||||
(log and log.info or print)(tag .. tran_msg(...))
|
||||
elseif WARN and tag:match("^" .. WARN) then
|
||||
(log and log.warning or print)(tag .. tran_msg(...))
|
||||
elseif ERROR and tag:match("^" .. ERROR) then
|
||||
(log and log.error or print)(tag .. tran_msg(...))
|
||||
elseif DEBUG and tag:match("^" .. DEBUG) then
|
||||
(log and log.error or print)(tag .. tran_msg(...))
|
||||
elseif CONSOLE and tag:match("^" .. CONSOLE) then
|
||||
(print)(tag .. tran_msg(...))
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
return puts
|
||||
@@ -1,4 +1,3 @@
|
||||
local drop_words =
|
||||
{ "示~例~",
|
||||
}
|
||||
return drop_words
|
||||
{ "示~例~", "肏女人", }
|
||||
return drop_words
|
||||
@@ -1,54 +1,60 @@
|
||||
local drop_list = require("cold_word_drop.drop_words")
|
||||
local hide_list = require("cold_word_drop.hide_words")
|
||||
local turndown_freq_list = require("cold_word_drop.turndown_freq_words")
|
||||
local filter = {}
|
||||
|
||||
local function filter(input, env)
|
||||
local idx = 3 -- 降频的词条放到第三个后面, 即第四位, 可在 yaml 里配置
|
||||
local i = 1
|
||||
local cands = {}
|
||||
local context = env.engine.context
|
||||
local preedit_code = context.input
|
||||
function filter.init(env)
|
||||
local engine = env.engine
|
||||
local config = engine.schema.config
|
||||
env.word_reduce_idx = config:get_int("cold_word_reduce/idx") or 4
|
||||
env.drop_words = require("cold_word_drop.drop_words") or {}
|
||||
env.hide_words = require("cold_word_drop.hide_words") or {}
|
||||
env.reduce_freq_words = require("cold_word_drop.reduce_freq_words") or {}
|
||||
end
|
||||
|
||||
for cand in input:iter() do
|
||||
local cpreedit_code = string.gsub(cand.preedit, ' ', '')
|
||||
if (i <= idx) then
|
||||
local tfl = turndown_freq_list[cand.text] or nil
|
||||
-- 前三个 候选项排除 要调整词频的词条, 要删的(实际假性删词, 彻底隐藏罢了) 和要隐藏的词条
|
||||
if not
|
||||
((tfl and table.find_index(tfl, cpreedit_code)) or
|
||||
table.find_index(drop_list, cand.text) or
|
||||
(hide_list[cand.text] and table.find_index(hide_list[cand.text], cpreedit_code))
|
||||
)
|
||||
then
|
||||
i = i + 1
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
yield(cand)
|
||||
else
|
||||
table.insert(cands, cand)
|
||||
end
|
||||
else
|
||||
table.insert(cands, cand)
|
||||
end
|
||||
if (#cands > 50) then
|
||||
break
|
||||
end
|
||||
end
|
||||
for _, cand in ipairs(cands) do
|
||||
local cpreedit_code = string.gsub(cand.preedit, ' ', '')
|
||||
if not
|
||||
-- 要删的 和要隐藏的词条不显示
|
||||
(
|
||||
table.find_index(drop_list, cand.text) or
|
||||
(hide_list[cand.text] and table.find_index(hide_list[cand.text], cpreedit_code))
|
||||
)
|
||||
then
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
yield(cand)
|
||||
end
|
||||
end
|
||||
for cand in input:iter() do
|
||||
yield(cand)
|
||||
end
|
||||
function filter.func(input, env)
|
||||
local cands = {}
|
||||
local context = env.engine.context
|
||||
local preedit_str = context.input:gsub(" ", "")
|
||||
local drop_words = env.drop_words
|
||||
local hide_words = env.hide_words
|
||||
local word_reduce_idx = env.word_reduce_idx
|
||||
local reduce_freq_words = env.reduce_freq_words
|
||||
for cand in input:iter() do
|
||||
local cand_text = cand.text:gsub(" ", "")
|
||||
local preedit_code = cand.preedit:gsub(" ", "") or preedit_str
|
||||
|
||||
local reduce_freq_list = reduce_freq_words[cand_text] or {}
|
||||
if word_reduce_idx > 1 then
|
||||
-- 前三个 候选项排除 要调整词频的词条, 要删的(实际假性删词, 彻底隐藏罢了) 和要隐藏的词条
|
||||
if reduce_freq_list and table.find_index(reduce_freq_list, preedit_code) then
|
||||
table.insert(cands, cand)
|
||||
elseif
|
||||
not (
|
||||
table.find_index(drop_words, cand_text)
|
||||
or (hide_words[cand_text] and table.find_index(hide_words[cand_text], preedit_code))
|
||||
|
||||
)
|
||||
then
|
||||
yield(cand)
|
||||
word_reduce_idx = word_reduce_idx - 1
|
||||
end
|
||||
else
|
||||
if
|
||||
not (
|
||||
table.find_index(drop_words, cand_text)
|
||||
or (hide_words[cand_text] and table.find_index(hide_words[cand_text], preedit_code))
|
||||
)
|
||||
then
|
||||
table.insert(cands, cand)
|
||||
end
|
||||
end
|
||||
|
||||
if #cands >= 180 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
for _, cand in ipairs(cands) do
|
||||
yield(cand)
|
||||
end
|
||||
end
|
||||
|
||||
return filter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
local hide_words =
|
||||
{ ["示~例~"] = { "shil", "shili", },
|
||||
{ ["示~例~"] = { "shil", "shili", },
|
||||
["么特瑞"] = { "meter", },
|
||||
}
|
||||
return hide_words
|
||||
return hide_words
|
||||
@@ -0,0 +1,48 @@
|
||||
-- runLog.lua
|
||||
-- Copyright (C) 2023 yaoyuan.dou <douyaoyuan@126.com>
|
||||
|
||||
local M = {}
|
||||
local dbgFlg = true
|
||||
|
||||
--设置 dbg 开关
|
||||
M.setDbg = function(flg)
|
||||
dbgFlg = flg
|
||||
|
||||
print('runLog dbgFlg is ' .. tostring(dbgFlg))
|
||||
end
|
||||
|
||||
local current_path = string.sub(debug.getinfo(1).source, 2, string.len("/runLog.lua") * -1)
|
||||
M.logDoc = current_path .. 'runLog.txt'
|
||||
|
||||
M.writeLog = function(logStr, newLineFlg)
|
||||
logStr = logStr or "nothing"
|
||||
|
||||
if not newLineFlg then newLineFlg = true end
|
||||
|
||||
local f = io.open(M.logDoc, 'a')
|
||||
if f then
|
||||
local timeStamp = os.date("%Y/%m/%d %H:%M:%S")
|
||||
f:write(timeStamp .. '[' .. _VERSION .. ']' .. '\t' .. logStr .. '\n')
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
|
||||
--===========================test========================
|
||||
M.test = function(printPrefix)
|
||||
if nil == printPrefix then
|
||||
printPrefix = ' '
|
||||
end
|
||||
if dbgFlg then
|
||||
M.writeLog('this is a test string on new line', true)
|
||||
M.writeLog('this is a test string appending the last line', false)
|
||||
M.writeLog('runLogDoc is: ' .. M.logDoc, true)
|
||||
end
|
||||
end
|
||||
|
||||
function M.init(...)
|
||||
--如果有需要初始化的动作,可以在这里运行
|
||||
end
|
||||
|
||||
M.init()
|
||||
|
||||
return M
|
||||
+110
-105
@@ -2,162 +2,167 @@
|
||||
orgtype = type
|
||||
|
||||
function type(obj)
|
||||
local _type = orgtype(obj)
|
||||
if "table" == _type and obj._cname then
|
||||
return obj._cname
|
||||
end
|
||||
return _type
|
||||
local _type = orgtype(obj)
|
||||
if "table" == _type and obj._cname then
|
||||
return obj._cname
|
||||
end
|
||||
return _type
|
||||
end
|
||||
|
||||
function metatable(...)
|
||||
if ... and type(...) == "table" then
|
||||
return setmetatable(..., { __index = table })
|
||||
else
|
||||
return setmetatable({ ... }, { __index = table })
|
||||
end
|
||||
if ... and type(...) == "table" then
|
||||
return setmetatable(..., { __index = table })
|
||||
else
|
||||
return setmetatable({ ... }, { __index = table })
|
||||
end
|
||||
end
|
||||
|
||||
-- chech metatble
|
||||
function metatable_chk(tab)
|
||||
if "table" == type(tab)
|
||||
then
|
||||
return (tab.each and tab) or metatable(tab)
|
||||
else
|
||||
return tab
|
||||
end
|
||||
if "table" == type(tab) then
|
||||
return (tab.each and tab) or metatable(tab)
|
||||
else
|
||||
return tab
|
||||
end
|
||||
end
|
||||
|
||||
table.eachi = function(tab, func)
|
||||
for i = 1, #tab do
|
||||
func(tab[i], i)
|
||||
end
|
||||
return tab
|
||||
for i = 1, #tab do
|
||||
func(tab[i], i)
|
||||
end
|
||||
return tab
|
||||
end
|
||||
table.eacha = function(tab, func)
|
||||
for i, v in ipairs(tab) do
|
||||
func(v, i)
|
||||
end
|
||||
return tab
|
||||
for i, v in ipairs(tab) do
|
||||
func(v, i)
|
||||
end
|
||||
return tab
|
||||
end
|
||||
table.each = function(tab, func)
|
||||
for k, v in pairs(tab) do
|
||||
func(v, k)
|
||||
end
|
||||
return tab
|
||||
for k, v in pairs(tab) do
|
||||
func(v, k)
|
||||
end
|
||||
return tab
|
||||
end
|
||||
table.find_index = function(tab, elm, ...)
|
||||
local _, i = table.find(tab, elm, ...)
|
||||
return i
|
||||
local _, i = table.find(tab, elm, ...)
|
||||
return i
|
||||
end
|
||||
table.find = function(tab, elm, func)
|
||||
for i, v in ipairs(tab) do
|
||||
if elm == v then
|
||||
return v, i
|
||||
end
|
||||
end
|
||||
for i, v in ipairs(tab) do
|
||||
if elm == v then
|
||||
return v, i
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.find_with_func = function(tab, elm, ...)
|
||||
local i, v = table.find(tab, elm)
|
||||
local i, v = table.find(tab, elm)
|
||||
end
|
||||
table.delete = function(tab, elm, ...)
|
||||
local index = table.find_index(tab, elm)
|
||||
return index and table.remove(tab, index)
|
||||
local index = table.find_index(tab, elm)
|
||||
return index and table.remove(tab, index)
|
||||
end
|
||||
|
||||
table.find_all = function(tab, elm, ...)
|
||||
local tmptab = setmetatable({}, { __index = table })
|
||||
local _func = (type(elm) == "function" and elm) or function(v, k, ...) return v == elm end
|
||||
for k, v in pairs(tab) do
|
||||
if _func(v, k, ...) then
|
||||
tmptab:insert(v)
|
||||
end
|
||||
end
|
||||
return tmptab
|
||||
local tmptab = setmetatable({}, { __index = table })
|
||||
local _func = (type(elm) == "function" and elm) or function(v, k, ...)
|
||||
return v == elm
|
||||
end
|
||||
for k, v in pairs(tab) do
|
||||
if _func(v, k, ...) then
|
||||
tmptab:insert(v)
|
||||
end
|
||||
end
|
||||
return tmptab
|
||||
end
|
||||
table.select = table.find_all
|
||||
|
||||
table.reduce = function(tab, func, arg)
|
||||
local new, old = arg, arg
|
||||
for i, v in ipairs(tab) do
|
||||
new, old = func(v, new)
|
||||
end
|
||||
return new, arg
|
||||
local new, old = arg, arg
|
||||
for i, v in ipairs(tab) do
|
||||
new, old = func(v, new)
|
||||
end
|
||||
return new, arg
|
||||
end
|
||||
|
||||
table.map = function(tab, func)
|
||||
local newtab = setmetatable({}, { __index = table })
|
||||
func = func or function(v, i) return v, i end
|
||||
for i, v in ipairs(tab) do
|
||||
newtab[i] = func(v, i)
|
||||
end
|
||||
return newtab
|
||||
local newtab = setmetatable({}, { __index = table })
|
||||
func = func or function(v, i)
|
||||
return v, i
|
||||
end
|
||||
for i, v in ipairs(tab) do
|
||||
newtab[i] = func(v, i)
|
||||
end
|
||||
return newtab
|
||||
end
|
||||
table.map_hash = function(tab, func) -- table to list of array { key, v}
|
||||
local newtab = setmetatable({}, { __index = table })
|
||||
func = func or function(k, v) return { k, v } end
|
||||
for k, v in pairs(tab) do
|
||||
newtab:insert(func(k, v))
|
||||
end
|
||||
return newtab
|
||||
table.map_hash = function(tab, func) -- table to list of array { key, v}
|
||||
local newtab = setmetatable({}, { __index = table })
|
||||
func = func or function(k, v)
|
||||
return { k, v }
|
||||
end
|
||||
for k, v in pairs(tab) do
|
||||
newtab:insert(func(k, v))
|
||||
end
|
||||
return newtab
|
||||
end
|
||||
function table:push(elm)
|
||||
self:insert(elm)
|
||||
self:insert(elm)
|
||||
end
|
||||
|
||||
table.append = table.push
|
||||
function table:pop()
|
||||
return self:remove(#self)
|
||||
return self:remove(#self)
|
||||
end
|
||||
|
||||
function table:shift()
|
||||
self:remove(1)
|
||||
self:remove(1)
|
||||
end
|
||||
|
||||
function table:unshift(elm)
|
||||
self:insert(1, elm)
|
||||
self:insert(1, elm)
|
||||
end
|
||||
|
||||
function table.len(t)
|
||||
local leng = 0
|
||||
for k, v in pairs(t) do
|
||||
leng = leng + 1
|
||||
end
|
||||
return leng;
|
||||
local leng = 0
|
||||
for k, v in pairs(t) do
|
||||
leng = leng + 1
|
||||
end
|
||||
return leng
|
||||
end
|
||||
|
||||
-- table to string 序列化
|
||||
function table.serialize(obj)
|
||||
local serialize_str = ""
|
||||
local t = type(obj)
|
||||
if t == "number" then
|
||||
serialize_str = serialize_str .. obj
|
||||
elseif t == "boolean" then
|
||||
serialize_str = serialize_str .. tostring(obj)
|
||||
elseif t == "string" then
|
||||
serialize_str = serialize_str .. string.format("%q", obj)
|
||||
elseif t == "table" then
|
||||
serialize_str = serialize_str .. "{ "
|
||||
local record_sep = #obj < 4 and ", " or ",\n"
|
||||
local record_prefix = #obj < 4 and "" or "\t"
|
||||
for k, v in pairs(obj) do
|
||||
if type(k) == "number" then
|
||||
serialize_str = serialize_str .. record_prefix .. '"' .. v .. '"' .. record_sep
|
||||
else
|
||||
serialize_str = serialize_str .. "\t[" .. table.serialize(k) .. "] = " .. table.serialize(v) .. ",\n"
|
||||
end
|
||||
end
|
||||
-- local metatable = getmetatable(obj)
|
||||
-- if metatable ~= nil and type(metatable.__index) == "table" then
|
||||
-- for k, v in pairs(metatable.__index) do
|
||||
-- serialize_str = serialize_str .. "[" .. table.serialize(k) .. "]=" .. table.serialize(v) .. ",\n"
|
||||
-- end
|
||||
-- end
|
||||
serialize_str = serialize_str .. "}"
|
||||
elseif t == "nil" then
|
||||
return nil
|
||||
else
|
||||
error("can not serialize a " .. t .. " type.")
|
||||
end
|
||||
return serialize_str
|
||||
local serialize_str = ""
|
||||
local t = type(obj)
|
||||
if t == "number" then
|
||||
serialize_str = serialize_str .. obj
|
||||
elseif t == "boolean" then
|
||||
serialize_str = serialize_str .. tostring(obj)
|
||||
elseif t == "string" then
|
||||
serialize_str = serialize_str .. string.format("%q", obj)
|
||||
elseif t == "table" then
|
||||
serialize_str = serialize_str .. "{ "
|
||||
local record_sep = #obj < 4 and ", " or ",\n"
|
||||
local record_prefix = #obj < 4 and "" or "\t"
|
||||
for k, v in pairs(obj) do
|
||||
if type(k) == "number" then
|
||||
serialize_str = serialize_str .. record_prefix .. '"' .. v .. '"' .. record_sep
|
||||
else
|
||||
serialize_str = serialize_str .. "\t[" .. table.serialize(k) .. "] = " .. table.serialize(v) .. ",\n"
|
||||
end
|
||||
end
|
||||
-- local metatable = getmetatable(obj)
|
||||
-- if metatable ~= nil and type(metatable.__index) == "table" then
|
||||
-- for k, v in pairs(metatable.__index) do
|
||||
-- serialize_str = serialize_str .. "[" .. table.serialize(k) .. "]=" .. table.serialize(v) .. ",\n"
|
||||
-- end
|
||||
-- end
|
||||
serialize_str = serialize_str .. "}"
|
||||
elseif t == "nil" then
|
||||
return nil
|
||||
else
|
||||
error("can not serialize a " .. t .. " type.")
|
||||
end
|
||||
return serialize_str
|
||||
end
|
||||
|
||||
+102
-134
@@ -1,151 +1,119 @@
|
||||
require('cold_word_drop.string')
|
||||
require("cold_word_drop.string")
|
||||
require("cold_word_drop.metatable")
|
||||
-- local puts = require("tools/debugtool")
|
||||
local drop_list = require("cold_word_drop.drop_words")
|
||||
local hide_list = require("cold_word_drop.hide_words")
|
||||
local turndown_freq_list = require("cold_word_drop.turndown_freq_words")
|
||||
local tbls = {
|
||||
['drop_list'] = drop_list,
|
||||
['hide_list'] = hide_list,
|
||||
['turndown_freq_list'] = turndown_freq_list
|
||||
}
|
||||
-- local cold_word_drop = {}
|
||||
|
||||
local processor = {}
|
||||
|
||||
local function get_record_filername(record_type)
|
||||
local user_distribute_name = rime_api:get_distribution_name()
|
||||
if user_distribute_name == '小狼毫' then
|
||||
return string.format("%s\\Rime\\lua\\cold_word_drop\\%s_words.lua", os.getenv("APPDATA"), record_type)
|
||||
end
|
||||
|
||||
local system = io.popen("uname -s"):read("*l")
|
||||
local filename = nil
|
||||
-- body
|
||||
if system == "Darwin" then
|
||||
filename = string.format("%s/Library/Rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type)
|
||||
elseif system == "Linux" then
|
||||
filename = string.format("%s/%s/rime/lua/cold_word_drop/%s_words.lua",
|
||||
os.getenv('HOME'),
|
||||
(string.find(os.getenv('GTK_IM_MODULE'), 'fcitx') and '.local/share/fcitx5' or '.config/ibus'),
|
||||
record_type)
|
||||
end
|
||||
return filename
|
||||
local path_sep = "/"
|
||||
local user_data_dir = rime_api:get_user_data_dir()
|
||||
local user_distribute_name = rime_api:get_distribution_code_name()
|
||||
if user_distribute_name:lower():match("weasel") then path_sep = [[\]] end
|
||||
if user_distribute_name:lower():match("ibus") then
|
||||
return string.format("%s/rime/lua/cold_word_records/%s_words.lua",
|
||||
os.getenv("HOME") .. "/.config/ibus",
|
||||
record_type
|
||||
)
|
||||
else
|
||||
local file_path = string.format("%s/lua/cold_word_records/%s_words.lua", user_data_dir, record_type)
|
||||
return file_path:gsub("/", path_sep)
|
||||
end
|
||||
end
|
||||
|
||||
local function write_word_to_file(record_type)
|
||||
-- local filename = string.format("%s/Library/Rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type)
|
||||
local filename = get_record_filername(record_type)
|
||||
local record_header = string.format("local %s_words =\n", record_type)
|
||||
local record_tailer = string.format("\nreturn %s_words", record_type)
|
||||
local fd = assert(io.open(filename, "w")) --打开
|
||||
fd:setvbuf("line")
|
||||
fd:write(record_header) --写入文件头部
|
||||
-- df:flush() --刷新
|
||||
local x = string.format("%s_list", record_type)
|
||||
local record = table.serialize(tbls[x]) -- lua 的 table 对象 序列化为字符串
|
||||
fd:write(record) --写入 序列化的字符串
|
||||
fd:write(record_tailer) --写入文件尾部, 结束记录
|
||||
fd:close() --关闭
|
||||
local function write_word_to_file(env, record_type)
|
||||
local filename = get_record_filername(record_type)
|
||||
local record_header = string.format("local %s_words =\n", record_type)
|
||||
local record_tailer = string.format("\nreturn %s_words", record_type)
|
||||
if not filename then
|
||||
return false
|
||||
end
|
||||
local fd = assert(io.open(filename, "w")) --打开
|
||||
-- fd:flush() --刷新
|
||||
local x = string.format("%s_list", record_type)
|
||||
local record = table.serialize(env.tbls[x]) -- lua 的 table 对象 序列化为字符串
|
||||
fd:setvbuf("line")
|
||||
fd:write(record_header) --写入文件头部
|
||||
fd:write(record) --写入 序列化的字符串
|
||||
fd:write(record_tailer) --写入文件尾部, 结束记录
|
||||
fd:close() --关闭
|
||||
end
|
||||
|
||||
local function check_encode_matched(cand_code, word, input_code_tbl, reversedb)
|
||||
if #cand_code < 1 and utf8.len(word) > 1 then -- 二字词以上的词条反查, 需要逐个字去反查
|
||||
local word_cand_code = string.split(word, "")
|
||||
for i, v in ipairs(word_cand_code) do
|
||||
-- 如有 `[` 引导的辅助码情况, 去掉引导符及之后的所有形码字符
|
||||
local char_code = string.gsub(reversedb:lookup(v), '%[%l%l', '')
|
||||
local _char_preedit_code = input_code_tbl[i] or " "
|
||||
-- 如有 `[` 引导的辅助码情况, 同上, 去掉之
|
||||
local char_preedit_code = string.gsub(_char_preedit_code, '%[%l+', '')
|
||||
if not string.match(char_code, char_preedit_code) then
|
||||
-- 输入编码串和词条反查结果不匹配(考虑到多音字, 开启了模糊音, 纠错音), 返回false, 表示隐藏这个词条
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
-- 输入编码串和词条反查结果匹配, 返回true, 表示对这个词条降频
|
||||
return true
|
||||
local function append_word_to_droplist(env, ctx, action_type)
|
||||
local word = ctx.word:gsub(" ", "")
|
||||
local input_code = ctx.code:gsub(" ", "")
|
||||
|
||||
if action_type == "drop" then
|
||||
table.insert(env.drop_words, word) -- 高亮选中的词条插入到 drop_list
|
||||
return true
|
||||
end
|
||||
|
||||
if action_type == "hide" then
|
||||
if not env.hide_words[word] then
|
||||
env.hide_words[word] = { input_code }
|
||||
-- 隐藏的词条如果已经在 hide_list 中, 则将输入串追加到 值表中, 如: ['藏'] = {'chang', 'zhang'}
|
||||
elseif not table.find_index(env.hide_words[word], input_code) then
|
||||
table.insert(env.hide_words[word], input_code)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
if action_type == "reduce_freq" then
|
||||
if env.reduce_freq_words[word] then
|
||||
table.insert(env.reduce_freq_words[word], input_code)
|
||||
else
|
||||
env.reduce_freq_words[word] = { input_code }
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function append_word_to_droplist(ctx, action_type, reversedb)
|
||||
local word = ctx.word
|
||||
local input_code = ctx.code
|
||||
if action_type == 'drop' then
|
||||
table.insert(drop_list, word) -- 高亮选中的词条插入到 drop_list
|
||||
return true
|
||||
end
|
||||
local input_code_tbl = string.split(input_code, " ")
|
||||
local cand_code = reversedb:lookup(word) or "" -- 反查候选项文字编码
|
||||
-- 二字词 的匹配检查, 匹配返回true, 不匹配返回false
|
||||
local match_result = check_encode_matched(cand_code, word, input_code_tbl, reversedb)
|
||||
local ccand_code = string.gsub(cand_code, '%[%l%l', '')
|
||||
-- 如有 `[` 引导的辅助码情况, 去掉引导符及之后的所有形码字符
|
||||
local input_str = string.gsub(input_code, '%[%l+', '')
|
||||
local input_code_str = table.concat(input_code_tbl, '')
|
||||
-- 单字和二字词 的匹配检查, 如果匹配, 降频
|
||||
if string.match(ccand_code, input_str) or match_result then
|
||||
if turndown_freq_list[word] then
|
||||
table.insert(turndown_freq_list[word], input_code_str)
|
||||
else
|
||||
turndown_freq_list[word] = { input_code_str }
|
||||
end
|
||||
return 'turndown_freq'
|
||||
end
|
||||
|
||||
-- 单字和二字词 如果不匹配 就隐藏
|
||||
if not hide_list[word] then
|
||||
hide_list[word] = { input_code_str }
|
||||
return true
|
||||
else
|
||||
-- 隐藏的词条如果已经在 hide_list 中, 则将输入串追加到 值表中, 如: ['藏'] = {'chang', 'zhang'}
|
||||
if not table.find_index(hide_list[word], input_code_str) then
|
||||
table.insert(hide_list[word], input_code_str)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
function processor.init(env)
|
||||
local engine = env.engine
|
||||
local config = engine.schema.config
|
||||
env.drop_cand_key = config:get_string("key_binder/drop_cand") or "Control+d"
|
||||
env.hide_cand_key = config:get_string("key_binder/hide_cand") or "Control+x"
|
||||
env.reduce_cand_key = config:get_string("key_binder/reduce_freq_cand") or "Control+j"
|
||||
env.drop_words = require("cold_word_drop.drop_words") or {}
|
||||
env.hide_words = require("cold_word_drop.hide_words") or {}
|
||||
env.reduce_freq_words = require("cold_word_drop.reduce_freq_words") or {}
|
||||
env.tbls = {
|
||||
["drop_list"] = env.drop_words,
|
||||
["hide_list"] = env.hide_words,
|
||||
["reduce_freq_list"] = env.reduce_freq_words,
|
||||
}
|
||||
end
|
||||
|
||||
local function processor(key, env)
|
||||
local engine = env.engine
|
||||
local config = engine.schema.config
|
||||
local context = engine.context
|
||||
-- local top_cand_text = context:get_commit_text()
|
||||
-- local preedit_code = context.input
|
||||
local preedit_code = context:get_script_text()
|
||||
local turndown_cand_key = config:get_string("key_binder/turn_down_cand") or "Control+j"
|
||||
local drop_cand_key = config:get_string("key_binder/drop_cand") or "Control+d"
|
||||
local action_map = {
|
||||
[turndown_cand_key] = 'hide',
|
||||
[drop_cand_key] = 'drop'
|
||||
}
|
||||
function processor.func(key, env)
|
||||
local engine = env.engine
|
||||
local context = engine.context
|
||||
local preedit_code = context:get_script_text()
|
||||
local action_map = {
|
||||
[env.drop_cand_key] = "drop",
|
||||
[env.hide_cand_key] = "hide",
|
||||
[env.reduce_cand_key] = "reduce_freq",
|
||||
}
|
||||
|
||||
-- local schema_id = config:get_string("schema/schema_id")
|
||||
local schema_id = config:get_string("translator/dictionary") -- 多方案共用字典取主方案名称
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
local reversedb = ReverseLookup(schema_id)
|
||||
if key:repr() == turndown_cand_key or key:repr() == drop_cand_key then
|
||||
local cand = context:get_selected_candidate()
|
||||
local action_type = action_map[key:repr()]
|
||||
local ctx_map = {
|
||||
['word'] = cand.text,
|
||||
['code'] = preedit_code
|
||||
}
|
||||
local res = append_word_to_droplist(ctx_map, action_type, reversedb)
|
||||
if context:has_menu() and action_map[key:repr()] then
|
||||
local cand = context:get_selected_candidate()
|
||||
local action_type = action_map[key:repr()]
|
||||
local ctx_map = {
|
||||
["word"] = cand.text,
|
||||
["code"] = preedit_code,
|
||||
}
|
||||
local res = append_word_to_droplist(env, ctx_map, action_type)
|
||||
|
||||
context:refresh_non_confirmed_composition() -- 刷新当前输入法候选菜单, 实现看到实时效果
|
||||
if type(res) == "boolean" then
|
||||
-- 期望被删的词和隐藏的词条写入文件(drop_words.lua, hide_words.lua)
|
||||
write_word_to_file(action_type)
|
||||
else
|
||||
-- 期望 要调整词频的词条写入 turndown_freq_words.lua 文件
|
||||
write_word_to_file(res)
|
||||
end
|
||||
return 1 -- kAccept
|
||||
end
|
||||
context:refresh_non_confirmed_composition() -- 刷新当前输入法候选菜单, 实现看到实时效果
|
||||
if not res then
|
||||
return 2
|
||||
end
|
||||
|
||||
return 2 -- kNoop, 不做任何操作, 交给下个组件处理
|
||||
if res then
|
||||
-- 期望被删的词和隐藏的词条写入文件(drop_words.lua, hide_words.lua)
|
||||
write_word_to_file(env, action_type)
|
||||
end
|
||||
|
||||
return 1 -- kAccept
|
||||
end
|
||||
|
||||
return 2 -- kNoop, 不做任何操作, 交给下个组件处理
|
||||
end
|
||||
|
||||
return processor
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
local reduce_freq_words =
|
||||
{ ["示~例~"] = { "shili", },
|
||||
["颜射"] = { "yanshe", },
|
||||
}
|
||||
return reduce_freq_words
|
||||
@@ -4,35 +4,34 @@
|
||||
-- string.utf8_offset= utf8.offset
|
||||
-- string.utf8_sub= utf8.sub
|
||||
function string.split(str, sp, sp1)
|
||||
sp = type(sp) == "string" and sp or " "
|
||||
if #sp == 0 then
|
||||
sp = "([%z\1-\127\194-\244][\128-\191]*)"
|
||||
elseif #sp == 1 then
|
||||
sp = "[^" .. (sp == "%" and "%%" or sp) .. "]*"
|
||||
else
|
||||
sp1 = sp1 or "^"
|
||||
str = str:gsub(sp, sp1)
|
||||
sp = "[^" .. sp1 .. "]*"
|
||||
end
|
||||
sp = type(sp) == "string" and sp or " "
|
||||
if #sp == 0 then
|
||||
sp = "([%z\1-\127\194-\244][\128-\191]*)"
|
||||
elseif #sp == 1 then
|
||||
sp = "[^" .. (sp == "%" and "%%" or sp) .. "]*"
|
||||
else
|
||||
sp1 = sp1 or "^"
|
||||
str = str:gsub(sp, sp1)
|
||||
sp = "[^" .. sp1 .. "]*"
|
||||
end
|
||||
|
||||
local tab = {}
|
||||
for v in str:gmatch(sp) do
|
||||
table.insert(tab, v)
|
||||
end
|
||||
return tab
|
||||
local tab = {}
|
||||
for v in str:gmatch(sp) do
|
||||
table.insert(tab, v)
|
||||
end
|
||||
return tab
|
||||
end
|
||||
|
||||
function utf8.gsub(str, si, ei)
|
||||
local function index(ustr, i)
|
||||
return i >= 0 and (ustr:utf8_offset(i) or ustr:len() + 1)
|
||||
or (ustr:utf8_offset(i) or 1)
|
||||
end
|
||||
local function index(ustr, i)
|
||||
return i >= 0 and (ustr:utf8_offset(i) or ustr:len() + 1) or (ustr:utf8_offset(i) or 1)
|
||||
end
|
||||
|
||||
local u_si = index(str, si)
|
||||
ei = ei or str:utf8_len()
|
||||
ei = ei >= 0 and ei + 1 or ei
|
||||
local u_ei = index(str, ei) - 1
|
||||
return str:sub(u_si, u_ei)
|
||||
local u_si = index(str, si)
|
||||
ei = ei or str:utf8_len()
|
||||
ei = ei >= 0 and ei + 1 or ei
|
||||
local u_ei = index(str, ei) - 1
|
||||
return str:sub(u_si, u_ei)
|
||||
end
|
||||
|
||||
string.utf8_len = utf8.len
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
local turndown_freq_words =
|
||||
{ ["示~例~"] = { "shili", },
|
||||
}
|
||||
return turndown_freq_words
|
||||
+7
-1
@@ -25,7 +25,6 @@ function M.init(env)
|
||||
["hun dun"] = { text = "馄饨", comment = "hún tun" },
|
||||
["zhu jiao"] = { text = "主角", comment = "zhǔ jué" },
|
||||
["jiao se"] = { text = "角色", comment = "júe sè" },
|
||||
["pi sa"] = { text = "比萨", comment = "bǐ sà" },
|
||||
["chi pi sa"] = { text = "吃比萨", comment = "chī bǐ sà" },
|
||||
["pi sa bing"] = { text = "比萨饼", comment = "bǐ sà bǐng" },
|
||||
["shui fu"] = { text = "说服", comment = "shuō fú" },
|
||||
@@ -98,6 +97,12 @@ function M.init(env)
|
||||
["nuo da"] = { text = "偌大", comment = "偌(ruò)大" },
|
||||
["yin jiu zhi ke"] = { text = "饮鸩止渴", comment = "饮鸩(zhèn)止渴" },
|
||||
["yin jiu jie ke"] = { text = "饮鸩解渴", comment = "饮鸩(zhèn)解渴" },
|
||||
["gong shang jiao zhi yu"] = { text = "宫商角徵羽", comment = "宫商角(jué)徵羽" },
|
||||
["shan qi deng"] = { text = "氙气灯", comment = "氙(xiān)气灯" },
|
||||
["shan qi da deng"] = { text = "氙气大灯", comment = "氙(xiān)气大灯" },
|
||||
["shan qi shou dian tong"] = { text = "氙气手电筒", comment = "氙(xiān)气手电筒" },
|
||||
["yin gai"] = { text = "应该", comment = "应(yīng)该" },
|
||||
["nian tie"] = { text = "粘贴", comment = "粘(zhān)贴" },
|
||||
-- 错字
|
||||
["pu jie"] = { text = "扑街", comment = "仆街" },
|
||||
["pu gai"] = { text = "扑街", comment = "仆街" },
|
||||
@@ -117,6 +122,7 @@ function M.init(env)
|
||||
["cou huo"] = { text = "凑活", comment = "凑合(he)" },
|
||||
["ju hui"] = { text = "钜惠", comment = "巨惠" },
|
||||
["mo xie zuo"] = { text = "魔蝎座", comment = "摩羯(jié)座" },
|
||||
["pi sa"] = { text = "披萨", comment = "比(bǐ)萨" },
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
+9
-14
@@ -1,20 +1,15 @@
|
||||
-- 这个 Lua 给英文单词后面自动加一个空格 #496
|
||||
-- 英文后,再输入英文单词(必须为候选项)自动添加空格
|
||||
local F = {}
|
||||
|
||||
local function add_space_to_english_word(input)
|
||||
-- 匹配纯英文单词(don't 算纯英文单词)并在单词后添加空格
|
||||
input = input:gsub("(%a+'?%a*)", "%1 ")
|
||||
return input
|
||||
end
|
||||
|
||||
-- 在候选项上屏时触发的函数
|
||||
local function en_spacer(input, env)
|
||||
function F.func( input, env )
|
||||
local latest_text = env.engine.context.commit_history:latest_text()
|
||||
for cand in input:iter() do
|
||||
if cand.text:match("^[%a']+[%a']*$") then
|
||||
-- 如果候选项是纯英文单词,则在输入后添加一个空格
|
||||
cand = cand:to_shadow_candidate(cand.type, add_space_to_english_word(cand.text), cand.comment)
|
||||
if cand.text:match( '^[%a\']+[%a\']*$' ) and latest_text and #latest_text > 0 and
|
||||
latest_text:find( '^ ?[%a\']+[%a\']*$' ) then
|
||||
cand = cand:to_shadow_candidate( 'en_spacer', cand.text:gsub( '(%a+\'?%a*)', ' %1' ), cand.comment )
|
||||
end
|
||||
yield(cand)
|
||||
yield( cand )
|
||||
end
|
||||
end
|
||||
|
||||
return en_spacer
|
||||
return F
|
||||
|
||||
+2
-1
@@ -549,6 +549,7 @@ local function Date2LunarDate(Gregorian)
|
||||
Month = tonumber(Gregorian.sub(Gregorian, 5, 6))
|
||||
Day = tonumber(Gregorian.sub(Gregorian, 7, 8))
|
||||
if Year > 2100 or Year < 1899 or Month > 12 or Month < 1 or Day < 1 or Day > 31 or string.len(Gregorian) < 8 then
|
||||
-- 2024.07.27 这个不能判断不存在的日期,例如 02.31 04.30 等,会显示农历,但不存在 by Mirtle
|
||||
return "无效日期", "无效日期"
|
||||
end
|
||||
|
||||
@@ -657,7 +658,7 @@ local function translator(input, seg, env)
|
||||
local lunar_date = Candidate("", seg.start, seg._end, date1, "")
|
||||
lunar_date.quality = 999
|
||||
yield(lunar_date)
|
||||
elseif env.gregorian_to_lunar ~= '' and input:sub(1, 1) == env.gregorian_to_lunar then
|
||||
elseif env.gregorian_to_lunar ~= '' and input:sub(1, 1) == env.gregorian_to_lunar and input:sub(2):find("^%d%d%d%d%d%d%d%d$") then
|
||||
local date1, date2 = Date2LunarDate(input:sub(2))
|
||||
local lunar_ymd = (Candidate("", seg.start, seg._end, date2, ""))
|
||||
lunar_ymd.quality = 999
|
||||
|
||||
@@ -130,10 +130,16 @@ local function number_translatorFunc(num)
|
||||
{ number2cnChar(numberPart.int, 0) ..
|
||||
decimal_func(numberPart.dec, { [1] = "角", [2] = "分", [3] = "厘", [4] = "毫" },
|
||||
{ [0] = "〇", "一", "二", "三", "四", "五", "六", "七", "八", "九" }), "〔金额小写〕" })
|
||||
table.insert(result,
|
||||
{ number2cnChar(numberPart.int, 1) ..
|
||||
decimal_func(numberPart.dec, { [1] = "角", [2] = "分", [3] = "厘", [4] = "毫" },
|
||||
{ [0] = "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }), "〔金额大写〕" })
|
||||
|
||||
local number2cnCharInt = number2cnChar(numberPart.int, 1)
|
||||
local number2cnCharDec = decimal_func(numberPart.dec, { [1] = "角", [2] = "分", [3] = "厘", [4] = "毫" }, { [0] = "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" })
|
||||
if string.len(numberPart.int) > 4 and number2cnCharInt:find('^拾[壹贰叁肆伍陆柒捌玖]?') and number2cnCharInt:find('[万亿]') then -- 简易地规避 utf8 匹配问题
|
||||
local number2cnCharInt_var = number2cnCharInt:gsub('^拾', '壹拾')
|
||||
table.insert(result, { number2cnCharInt_var .. number2cnCharDec , "〔金额大写〕"})
|
||||
-- 会计书写要求 https://github.com/iDvel/rime-ice/issues/989
|
||||
else
|
||||
table.insert(result, { number2cnCharInt .. number2cnCharDec , "〔金额大写〕"})
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
@@ -26,23 +26,26 @@ cand.preedit 是经过 translator/preedit_format 转换后的编码
|
||||
- wsm 为什么
|
||||
|
||||
### 空格的作用:
|
||||
- nihao 你好
|
||||
无空格,生成原样;
|
||||
生成 nihao,输入 nihao 时首位是「你好」,但输入 nih 时首位可能是「你会 你还」等其他词语。
|
||||
- nihao 你好
|
||||
|
||||
- ni hao 你好
|
||||
包含空格,额外生成最后一个空格后的拼音的首字母简码;
|
||||
生成 nihao nih ,现在输入 nih 时首位也会是「你好」。
|
||||
- ni hao 你好
|
||||
|
||||
- bu hao chi 不好吃
|
||||
包含空格且结尾以 zh ch sh 开头,再额外生成最后一个空格后的拼音的 zh ch sh 简码;
|
||||
生成 buhaochi buhaoc buhaoch
|
||||
- bu hao chi 不好吃
|
||||
|
||||
### 优先级:
|
||||
以下两行,会额外生成 'da z' 'da zh' 的置顶,前两个候选项是「大专、大众」,先写的排在前面
|
||||
- da zhuang 大专
|
||||
- da zhong 大众
|
||||
上面两行,会额外生成 'da z' 'da zh' 的置顶,前两个候选项是「大专、大众」,先写的排在前面
|
||||
|
||||
- da z 打字
|
||||
如果明确定义了简码形式,则完全使用简码形式
|
||||
此时输入 daz 首位为「打字」,输入 dazh 首位仍为「大专、大众」
|
||||
- da z 打字
|
||||
--]]
|
||||
|
||||
local function find_index(list, str)
|
||||
|
||||
@@ -18,7 +18,7 @@ function M.init(env)
|
||||
local all = { "aid", "aim", "air", "and", "ann", "ant", "any", "bad", "bag", "bail", "bait", "bam", "ban", "band",
|
||||
"bang", "bank", "bans", "bar", "bat", "bay", "bend", "benq", "bent", "benz", "bib", "bid", "bien", "big", "bin",
|
||||
"bind", "bit", "biz", "bob", "boc", "bop", "bos", "bot", "bow", "box", "boy", "bud", "buf", "bug", "bus",
|
||||
"but", "buy", "cab", "cad", "cain", "cam", "can", "cans", "cant", "cap", "car", "cas", "cat", "cef", "cen",
|
||||
"but", "buy", "cab", "cad", "cain", "cam", "can", "cans", "cant", "cap", "car", "cat", "cef", "cen",
|
||||
"cent", "chad", "chan", "chap", "char", "chat", "chef", "chen", "cher", "chew", "chic", "chin", "chip", "chit",
|
||||
"coup", "cum", "cunt", "cup", "cur", "cut", "dab", "dad", "dag", "dal", "dam", "day", "def", "del", "den",
|
||||
"dent", "deny", "der", "dew", "dial", "did", "died", "dies", "diet", "dig", "dim", "din", "dip", "dir", "dis",
|
||||
@@ -51,7 +51,8 @@ function M.init(env)
|
||||
"lush", "mesh", "much", "nash", "pinch", "pouch", "push", "ranch", "rich", "rush", "such", "tech", "touch",
|
||||
"wash", "zach",
|
||||
-- 其他
|
||||
"quanx", "eg",
|
||||
"eg",
|
||||
"my", "mt", "dj", "as", "js", "cs", "ak", "ps", "cd", "cn", "hk", "bt", "pk", "ml"
|
||||
}
|
||||
M.all = {}
|
||||
for _, v in ipairs(all) do
|
||||
|
||||
+4
-1
@@ -32,6 +32,7 @@ local function update_dict_entry( s, code, mem, proj )
|
||||
return 0
|
||||
end
|
||||
local e = DictEntry()
|
||||
s = s:gsub( '^%s+', '' ):gsub( '%s+$', '' )
|
||||
e.text = s
|
||||
|
||||
local pos = {}
|
||||
@@ -80,7 +81,7 @@ end
|
||||
|
||||
-- 通过 reverse db 查询(以字查码,然后比对辅码是否相同,快,但只能匹配未经算法转换的码)
|
||||
local function reverse_lookup( code_projection, db_table, wildcard, text, s, global_match )
|
||||
if wildcard then s = s:gsub( wildcard, '.*' ) end
|
||||
if wildcard then s = s:gsub( wildcard, '.+' ) end
|
||||
if code_projection then
|
||||
-- old librime do not return original string when apply failed
|
||||
local p = code_projection:apply( s, true )
|
||||
@@ -294,6 +295,8 @@ function f.fini( env )
|
||||
if env.if_reverse_lookup or env.if_schema_lookup then
|
||||
env.notifier:disconnect()
|
||||
env.commit_notifier:disconnect()
|
||||
if env.mem and env.mem.disconnect then env.mem:disconnect() end
|
||||
if env.search and env.search.disconnect then env.search:disconnect() end
|
||||
if env.mem or env.search or env.db_table then
|
||||
env.db_table = nil
|
||||
env.mem = nil
|
||||
|
||||
+24
-18
@@ -3,26 +3,32 @@
|
||||
-- 示例:输入 U62fc 得到「拼」
|
||||
-- 触发前缀默认为 recognizer/patterns/unicode 的第 2 个字符,即 U
|
||||
-- 2024.02.26: 限定编码最大值
|
||||
-- 2024.06.01: 部分变量初始化,条件语句调整。
|
||||
|
||||
local path = 'recognizer/patterns/unicode'
|
||||
local function unicode(input, seg, env)
|
||||
if not seg:has_tag("unicode") or input == '' then return end
|
||||
-- 获取 recognizer/patterns/unicode 的第 2 个字符作为触发前缀
|
||||
env.unicode_keyword = env.unicode_keyword or
|
||||
env.engine.schema.config:get_string('recognizer/patterns/unicode'):sub(2, 2)
|
||||
if seg:has_tag("unicode") and env.unicode_keyword ~= '' and input:sub(1, 1) == env.unicode_keyword then
|
||||
local ucodestr = input:match(env.unicode_keyword .. "(%x+)")
|
||||
if ucodestr and #ucodestr > 1 then
|
||||
local code = tonumber(ucodestr, 16)
|
||||
if code > 0x10FFFF then
|
||||
yield(Candidate("unicode", seg.start, seg._end, "数值超限!", ""))
|
||||
return
|
||||
end
|
||||
local text = utf8.char(code)
|
||||
yield(Candidate("unicode", seg.start, seg._end, text, string.format("U%x", code)))
|
||||
if code < 0x10000 then
|
||||
for i = 0, 15 do
|
||||
local text = utf8.char(code * 16 + i)
|
||||
yield(Candidate("unicode", seg.start, seg._end, text, string.format("U%x~%x", code, i)))
|
||||
end
|
||||
end
|
||||
-- config:get_string(path) 可能取得 nil 造成error
|
||||
if not env.unicode_keyword then
|
||||
local pattern = env.engine.schema.config:get_string(path) or "UU"
|
||||
env.unicode_keyword = pattern:sub(2,2)
|
||||
end
|
||||
|
||||
local ucodestr = input:match(env.unicode_keyword .. "(%x+)")
|
||||
if ucodestr and #ucodestr > 1 then
|
||||
local code = tonumber(ucodestr, 16)
|
||||
if code > 0x10FFFF then
|
||||
yield(Candidate("unicode", seg.start, seg._end, "数值超限!", ""))
|
||||
return
|
||||
end
|
||||
local text = utf8.char(code)
|
||||
yield(Candidate("unicode", seg.start, seg._end, text, string.format("U%x", code)))
|
||||
if code < 0x10000 then
|
||||
for i = 0, 15 do
|
||||
local text = utf8.char(code * 16 + i)
|
||||
yield(Candidate("unicode", seg.start, seg._end, text, string.format("U%x~%x", code, i)))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+36
-2
@@ -1,3 +1,16 @@
|
||||
摇头 摇头 🙂↔️
|
||||
点头 点头 🙂↕️
|
||||
凤凰 凤凰 🐦🔥
|
||||
青柠 青柠 🍋🟩
|
||||
棕蘑菇 棕蘑菇 🍄🟫
|
||||
断链 断链 ⛓️💥
|
||||
悬浮 悬浮 🕴
|
||||
地图 地图 🗺️
|
||||
map map 🗺️
|
||||
向右走 向右走 🚶♂️➡️ 🚶♀️➡️
|
||||
往右走 往右走 🚶♂️➡️ 🚶♀️➡️
|
||||
向右跑 向右跑 🏃♂️➡️ 🏃♀️➡️
|
||||
往右跑 往右跑 🏃♂️➡️ 🏃♀️➡️
|
||||
人民币 人民币 ¥
|
||||
日元 日元 ¥ 💴
|
||||
日币 日币 ¥
|
||||
@@ -12,6 +25,12 @@
|
||||
新加坡币 新加坡币 S$
|
||||
欧元 欧元 € 💶
|
||||
英镑 英镑 £ 💷
|
||||
镑 镑 £
|
||||
比特币 比特币 ₿
|
||||
泰铢 泰铢 ฿
|
||||
铢 铢 ฿
|
||||
卢比 卢比 ₨
|
||||
印度卢比 印度卢比 ₹
|
||||
笑脸 笑脸 😀
|
||||
露齿笑 露齿笑 😃
|
||||
哈 哈 😄
|
||||
@@ -73,6 +92,7 @@
|
||||
星星眼 星星眼 🤩
|
||||
眼冒星星 眼冒星星 🤩
|
||||
亲亲 亲亲 😘
|
||||
亲你 亲你 😘
|
||||
飞吻 飞吻 😘
|
||||
亲一个 亲一个 😘
|
||||
亲一下 亲一下 😘
|
||||
@@ -1337,6 +1357,8 @@ baby baby 👶 🚼
|
||||
走路 走路 🚶♂️ 🚶♀️
|
||||
徒步 徒步 🚶♂️ 🚶♀️
|
||||
行走 行走 🚶♂️ 🚶♀️
|
||||
向左走 向左走 🚶♂️ 🚶♀️
|
||||
往左走 往左走 🚶♂️ 🚶♀️
|
||||
站着 站着 🧍♂️ 🧍♀️
|
||||
站立 站立 🧍♂️ 🧍♀️
|
||||
站立者 站立者 🧍♂️ 🧍♀️
|
||||
@@ -1349,6 +1371,7 @@ baby baby 👶 🚼
|
||||
妹妹 妹妹 🧍♀️
|
||||
女仔 女仔 🧍♀️
|
||||
跪坐 跪坐 🧎♂️ 🧎♀️
|
||||
跪着 跪着 🧎♂️ 🧎♀️
|
||||
拄盲杖的人 拄盲杖的人 👨🦯 👩🦯
|
||||
拿着白手杖的人 拿着白手杖的人 👨🦯 👩🦯
|
||||
坐电动轮椅的人 坐电动轮椅的人 👨🦼 👩🦼
|
||||
@@ -1362,6 +1385,8 @@ baby baby 👶 🚼
|
||||
跑步 跑步 🏃♂️ 🏃♀️
|
||||
跑步者 跑步者 🏃♂️ 🏃♀️
|
||||
马拉松 马拉松 🏃♂️ 🏃♀️
|
||||
向左跑 向左跑 🏃♂️ 🏃♀️
|
||||
往左跑 往左跑 🏃♂️ 🏃♀️
|
||||
跳舞 跳舞 💃 🕺
|
||||
跳舞的女人 跳舞的女人 💃
|
||||
舞女 舞女 💃
|
||||
@@ -2390,8 +2415,8 @@ cookies cookies 🍪
|
||||
庙宇 庙宇 🛕
|
||||
犹太教会堂 犹太教会堂 🕍
|
||||
犹太教堂 犹太教堂 🕍
|
||||
神社 神社 ⛩
|
||||
日本神社 日本神社 ⛩
|
||||
神社 神社 ⛩️
|
||||
日本神社 日本神社 ⛩️
|
||||
克尔白 克尔白 🕋
|
||||
喷泉 喷泉 ⛲
|
||||
公园 公园 ⛲
|
||||
@@ -2725,6 +2750,7 @@ cloud cloud ☁️
|
||||
吹拂 吹拂 🌬
|
||||
吹风 吹风 🌬
|
||||
吹口气 吹口气 🌬
|
||||
吹气 吹气 🌬
|
||||
台风 台风 🌀
|
||||
旋风 旋风 🌀
|
||||
飓风 飓风 🌀
|
||||
@@ -2897,6 +2923,7 @@ cloud cloud ☁️
|
||||
魔法棒 魔法棒 🪄
|
||||
魔棒 魔棒 🪄
|
||||
手柄 手柄 🎮
|
||||
游戏 游戏 🎮
|
||||
游戏手柄 游戏手柄 🎮
|
||||
视频游戏手柄 视频游戏手柄 🎮
|
||||
电子游戏手柄 电子游戏手柄 🎮
|
||||
@@ -3458,6 +3485,9 @@ email email 📧
|
||||
开战 开战 ⚔️
|
||||
开始战斗 开始战斗 ⚔️
|
||||
fight fight ⚔️
|
||||
剑 剑 ⚔️
|
||||
剑刃 剑刃 ⚔️
|
||||
武器 武器 ⚔️
|
||||
炸弹 炸弹 💣
|
||||
boom boom 💣
|
||||
回旋镖 回旋镖 🪃
|
||||
@@ -3469,6 +3499,7 @@ boom boom 💣
|
||||
弓箭 弓箭 🏹
|
||||
弓和箭 弓和箭 🏹
|
||||
盾牌 盾牌 🛡
|
||||
防具 防具 🛡
|
||||
手锯 手锯 🪚
|
||||
锯子 锯子 🪚
|
||||
扳手 扳手 🔧
|
||||
@@ -3519,8 +3550,10 @@ DNA DNA 🧬
|
||||
接收天线 接收天线 📡
|
||||
注射器 注射器 💉
|
||||
打针 打针 💉
|
||||
血 血 🩸
|
||||
血滴 血滴 🩸
|
||||
滴血 滴血 🩸
|
||||
血液 血液 🩸
|
||||
药丸 药丸 💊
|
||||
胶囊 胶囊 💊
|
||||
创可贴 创可贴 🩹
|
||||
@@ -4054,6 +4087,7 @@ new new 🆕
|
||||
全新 全新 🆕
|
||||
NG NG 🆖
|
||||
重拍 重拍 🆖
|
||||
P P 🅿️
|
||||
停车 停车 🅿️
|
||||
停车场 停车场 🅿️
|
||||
停车按钮 停车按钮 🅿️
|
||||
|
||||
+18
-1
@@ -1,6 +1,23 @@
|
||||
# 更新日志
|
||||
|
||||
除日常更新词库外的一些主要更新 🆕 及破坏性变更 ⚠️。
|
||||
除日常更新词库外的一些主要更新 🆕、破坏性变更 ⚠️。
|
||||
|
||||
## 2024-09-25
|
||||
|
||||
- `number_translator.lua`:⚙️ 依会计凭证书写要求,修正万亿的金额大写格式
|
||||
- radical_pinyin: 🆕 拆字词典更新至 v2,包含更多汉字
|
||||
|
||||
## 2024-08-29
|
||||
- `cold_word_drop`:🆕 支持 iOS (#1003)
|
||||
|
||||
## 2024-08-18
|
||||
|
||||
- ci: 词典处理脚本可在 GitHub CI 中运行,提交信息以 ` [build]` 结尾或者手动执行时触发。
|
||||
|
||||
## 2024-07-27
|
||||
|
||||
- `number_translator.lua`: 🆕 转换时,将「拾万」和「壹拾万」作为两个独立的候选。
|
||||
- `en_spacer.lua`:⚠️ 现在不会在中英标点、空字符前添加空格。将在英文后添加空格,修改为在英文前添加空格。
|
||||
|
||||
## 2024-05-15
|
||||
|
||||
|
||||
+12
-1
@@ -250,7 +250,6 @@ OK了吗
|
||||
腾讯QQ
|
||||
公网IP
|
||||
Web开发
|
||||
圈X
|
||||
Switch版
|
||||
Switch版本
|
||||
A型血
|
||||
@@ -462,3 +461,15 @@ TF版本
|
||||
O不OK
|
||||
人均GDP
|
||||
V8引擎
|
||||
4A级
|
||||
5A级
|
||||
2G网络
|
||||
3G网络
|
||||
4G网络
|
||||
5G网络
|
||||
3G流量
|
||||
4G流量
|
||||
5G流量
|
||||
3D打印
|
||||
2D电影
|
||||
3D电影
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 139 KiB |
+44
-18
@@ -1,12 +1,11 @@
|
||||
# Emoji 映射表
|
||||
# 根据此文件生成 emoji.txt
|
||||
#
|
||||
# version: 2024-05-21
|
||||
# version: 2024-11-10
|
||||
#
|
||||
# 中文映射由 Dvel 纯手工打造 https://github.com/iDvel/rime-ice
|
||||
#
|
||||
# 数据来源 https://www.unicode.org/emoji/charts/emoji-ordering.html
|
||||
# Emoji 版本 v15.0
|
||||
# 数据来源 https://www.unicode.org/emoji/charts/index.html
|
||||
#
|
||||
# 内容全部以空格分割。
|
||||
#
|
||||
@@ -17,6 +16,29 @@
|
||||
# 增加少量非 Emoji 符号,如金钱(¥$€£)和细长箭头(←↖↑↗↙↓↘→)
|
||||
|
||||
|
||||
### 2024 等 Apple Color Emoji 支持显示了再上
|
||||
# 🇨🇶
|
||||
|
||||
|
||||
### 2023
|
||||
🙂↔️ 摇头
|
||||
🙂↕️ 点头
|
||||
🐦🔥 凤凰
|
||||
🍋🟩 青柠
|
||||
🍄🟫 棕蘑菇
|
||||
⛓️💥 断链
|
||||
|
||||
|
||||
### 未分类
|
||||
# /emoji-ordering.html 里没有,但是 /emoji-versions.html 里有???
|
||||
🕴 悬浮
|
||||
🗺️ 地图 map
|
||||
🚶♂️➡️ 向右走 往右走
|
||||
🚶♀️➡️ 向右走 往右走
|
||||
🏃♂️➡️ 向右跑 往右跑
|
||||
🏃♀️➡️ 向右跑 往右跑
|
||||
|
||||
|
||||
### 金钱符号
|
||||
¥ 人民币 日元 日币
|
||||
$ 美元 美刀
|
||||
@@ -24,7 +46,11 @@ HK$ 港元 港币
|
||||
MOP$ 澳门元 澳门币 葡币
|
||||
S$ 新加坡元 新加坡币
|
||||
€ 欧元
|
||||
£ 英镑
|
||||
£ 英镑 镑
|
||||
₿ 比特币
|
||||
฿ 泰铢 铢
|
||||
₨ 卢比
|
||||
₹ 印度卢比
|
||||
|
||||
|
||||
### Smileys & Emotion
|
||||
@@ -47,7 +73,7 @@ S$ 新加坡元 新加坡币
|
||||
🥰 喜笑颜开 爱心环绕 爱慕 迷恋 陷入爱河 坠入爱河 幸福
|
||||
😍 喜欢 花痴
|
||||
🤩 崇拜 好崇拜 好崇拜哦 星星眼 眼冒星星
|
||||
😘 亲亲 飞吻 亲一个 亲一下 啵一个 啵儿一个
|
||||
😘 亲亲 亲你 飞吻 亲一个 亲一下 啵一个 啵儿一个
|
||||
😗 噘嘴
|
||||
# ☺
|
||||
😚 羞涩亲亲
|
||||
@@ -462,14 +488,14 @@ S$ 新加坡元 新加坡币
|
||||
💇♂️ 剪头 剪发 理发 理头 剪头发 理头发 做造型 美容美发
|
||||
💇♀️ 剪头 剪发 理发 理头 剪头发 理头发 做造型 美容美发
|
||||
# 🚶
|
||||
🚶♂️ 走路 徒步 行走
|
||||
🚶♀️ 走路 徒步 行走
|
||||
🚶♂️ 走路 徒步 行走 向左走 往左走
|
||||
🚶♀️ 走路 徒步 行走 向左走 往左走
|
||||
# 🧍
|
||||
🧍♂️ 站着 站立 站立者 站立的男人 哥哥 弟弟 男仔
|
||||
🧍♀️ 站着 站立 站立者 站立的女人 姐姐 妹妹 女仔
|
||||
# 🧎
|
||||
🧎♂️ 跪坐
|
||||
🧎♀️ 跪坐
|
||||
🧎♂️ 跪坐 跪着
|
||||
🧎♀️ 跪坐 跪着
|
||||
# 🧑🦯
|
||||
👨🦯 拄盲杖的人 拿着白手杖的人
|
||||
👩🦯 拄盲杖的人 拿着白手杖的人
|
||||
@@ -480,8 +506,8 @@ S$ 新加坡元 新加坡币
|
||||
👨🦽 坐手动轮椅的人 坐手动轮椅的男人 手动轮椅
|
||||
👩🦽 坐手动轮椅的人 坐手动轮椅的女人 手动轮椅
|
||||
# 🏃
|
||||
🏃♂️ 跑步 跑步者 马拉松
|
||||
🏃♀️ 跑步 跑步者 马拉松
|
||||
🏃♂️ 跑步 跑步者 马拉松 向左跑 往左跑
|
||||
🏃♀️ 跑步 跑步者 马拉松 向左跑 往左跑
|
||||
💃 跳舞 跳舞的女人 舞女
|
||||
🕺 跳舞 跳舞的男人 舞者
|
||||
🕴 浮在地面上的西装男
|
||||
@@ -953,7 +979,7 @@ S$ 新加坡元 新加坡币
|
||||
🕌 清真寺 清真
|
||||
🛕 印度庙 印度寺庙 佛寺 庙宇
|
||||
🕍 犹太教会堂 犹太教堂
|
||||
⛩ 神社 日本神社
|
||||
⛩️ 神社 日本神社
|
||||
🕋 克尔白
|
||||
# place-other
|
||||
⛲ 喷泉 公园
|
||||
@@ -1116,7 +1142,7 @@ S$ 新加坡元 新加坡币
|
||||
🌩 打雷 雷云
|
||||
🌪 龙卷风
|
||||
🌫 雾 霾 雾霾
|
||||
🌬 风吹拂的脸 风吹拂 吹拂 吹风 吹口气
|
||||
🌬 风吹拂的脸 风吹拂 吹拂 吹风 吹口气 吹气
|
||||
🌀 台风 旋风 飓风 漩涡 蚊香 气旋
|
||||
🌈 彩虹
|
||||
🌂 收起的伞 收起的雨伞 雨伞
|
||||
@@ -1197,7 +1223,7 @@ S$ 新加坡元 新加坡币
|
||||
🎱 台球 黑八
|
||||
🔮 水晶球 占卜
|
||||
🪄 魔法棒 魔棒
|
||||
🎮 手柄 游戏手柄 视频游戏手柄 电子游戏手柄
|
||||
🎮 手柄 游戏 游戏手柄 视频游戏手柄 电子游戏手柄
|
||||
🕹 操控杆 游戏操控杆 摇杆 游戏摇杆
|
||||
🎰 老虎机 赌场 赌博
|
||||
🎲 色子 骰子 赌博 酒桌游戏
|
||||
@@ -1431,11 +1457,11 @@ S$ 新加坡元 新加坡币
|
||||
⚒️ 锤子与镐 锤子和镐
|
||||
🛠 锤子和扳手 锤子与扳手 锤子扳手 工具
|
||||
🗡 匕首 短刀 短剑
|
||||
⚔️ 双剑 双剑交叉 战斗 开战 开始战斗 fight
|
||||
⚔️ 双剑 双剑交叉 战斗 开战 开始战斗 fight 剑 剑刃 武器
|
||||
💣 炸弹 boom
|
||||
🪃 回旋镖 飞旋镖 回力棒 回力镖 飞去来器 回飞棒
|
||||
🏹 弓箭 弓和箭
|
||||
🛡 盾牌
|
||||
🛡 盾牌 防具
|
||||
🪚 手锯 锯子
|
||||
🔧 扳手 螺丝扳手
|
||||
🪛 螺丝刀
|
||||
@@ -1460,7 +1486,7 @@ S$ 新加坡元 新加坡币
|
||||
📡 卫星天线 天线 接收天线
|
||||
# medical
|
||||
💉 注射器 打针
|
||||
🩸 血滴 滴血
|
||||
🩸 血 血滴 滴血 血液
|
||||
💊 药丸 胶囊
|
||||
🩹 创可贴 创口贴
|
||||
🩼 拐杖
|
||||
@@ -1684,7 +1710,7 @@ S$ 新加坡元 新加坡币
|
||||
🆕 new 新 新的 新建 全新
|
||||
🆖 NG 重拍
|
||||
🆗 OK
|
||||
🅿️ 停车 停车场 停车按钮 泊车 parking
|
||||
🅿️ P 停车 停车场 停车按钮 泊车 parking
|
||||
🆘 SOS 求救信号 求救讯号 救命 救我 救救我 求救
|
||||
🆙 up 顶 升级
|
||||
🆚 Vs. 比 对决 对抗 对战 比赛
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module script
|
||||
|
||||
go 1.20
|
||||
go 1.22
|
||||
|
||||
require github.com/deckarep/golang-set/v2 v2.3.0
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@ SORT:
|
||||
}
|
||||
|
||||
func areYouOK() {
|
||||
if rime.AutoConfirm {
|
||||
fmt.Println("Auto confirm enabled. Skipping prompt.")
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("Are you OK:")
|
||||
var isOK string
|
||||
_, _ = fmt.Scanf("%s", &isOK)
|
||||
|
||||
@@ -28,7 +28,7 @@ var (
|
||||
)
|
||||
|
||||
// 初始化特殊词汇列表、需要注音列表、错别字列表、拼音列表
|
||||
func init() {
|
||||
func initCheck() {
|
||||
// 特殊词汇列表,不进行任何检查
|
||||
specialWords.Add("狄尔斯–阿尔德反应")
|
||||
specialWords.Add("特里斯坦–达库尼亚")
|
||||
@@ -102,7 +102,7 @@ func init() {
|
||||
text, code := parts[0], parts[1]
|
||||
hanPinyin[text] = append(hanPinyin[text], code)
|
||||
}
|
||||
// 给 hanPinyin 补充不再字表的读音,和过滤列表 hanPinyinFilter
|
||||
// 给 hanPinyin 补充不在字表的读音,和过滤列表 hanPinyinFilter
|
||||
file4, err := os.Open(汉字拼音映射TXT)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
|
||||
+334
-320
@@ -56,7 +56,6 @@ var polyphones = map[string]string{
|
||||
"MAC地址 > 地": "di",
|
||||
"OK了 > 了": "le",
|
||||
"OK了吗 > 了": "le",
|
||||
"圈X > 圈": "quan",
|
||||
"A型血 > 血": "xue",
|
||||
"A血型 > 血": "xue",
|
||||
"B型血 > 血": "xue",
|
||||
@@ -92,6 +91,10 @@ var polyphones = map[string]string{
|
||||
"Chrome系 > 系": "xi",
|
||||
"QQ游戏大厅 > 大": "da",
|
||||
"QQ飞车 > 车": "che",
|
||||
"2G网络 > 络": "luo",
|
||||
"3G网络 > 络": "luo",
|
||||
"4G网络 > 络": "luo",
|
||||
"5G网络 > 络": "luo",
|
||||
}
|
||||
|
||||
var digitMap = map[string]string{
|
||||
@@ -118,330 +121,341 @@ type schema struct {
|
||||
file *os.File
|
||||
}
|
||||
|
||||
var doublePinyin = schema{
|
||||
name: "cn_en_double_pinyin",
|
||||
desc: "自然码双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_double_pinyin.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "aa",
|
||||
"-e-": "ee",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ai",
|
||||
"-ei-": "ei",
|
||||
"-ou-": "ou",
|
||||
"-an-": "an",
|
||||
"-en-": "en",
|
||||
"-ang-": "ah",
|
||||
"-eng-": "eg",
|
||||
"-ao-": "ao",
|
||||
"-er-": "er",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"ve": "t",
|
||||
"ing": "y",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
var (
|
||||
doublePinyin schema
|
||||
doublePinyinFlypy schema
|
||||
doublePinyinMSPY schema
|
||||
doublePinyinSogou schema
|
||||
doublePinyinZiGuang schema
|
||||
doublePinyinABC schema
|
||||
)
|
||||
|
||||
var doublePinyinFlypy = schema{
|
||||
name: "cn_en_flypy",
|
||||
desc: "小鹤双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_flypy.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "aa",
|
||||
"-e-": "ee",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ai",
|
||||
"-ei-": "ei",
|
||||
"-ou-": "ou",
|
||||
"-an-": "an",
|
||||
"-en-": "en",
|
||||
"-ang-": "ah",
|
||||
"-eng-": "eg",
|
||||
"-ao-": "ao",
|
||||
"-er-": "er",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ei": "w",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"ve": "t",
|
||||
"un": "y",
|
||||
"uo": "o",
|
||||
"ie": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"ai": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ing": "k",
|
||||
"uai": "k",
|
||||
"iang": "l",
|
||||
"uang": "l",
|
||||
"ou": "z",
|
||||
"ia": "x",
|
||||
"ua": "x",
|
||||
"ao": "c",
|
||||
"ui": "v",
|
||||
"in": "b",
|
||||
"iao": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
func initSchemas() {
|
||||
doublePinyin = schema{
|
||||
name: "cn_en_double_pinyin",
|
||||
desc: "自然码双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_double_pinyin.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "aa",
|
||||
"-e-": "ee",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ai",
|
||||
"-ei-": "ei",
|
||||
"-ou-": "ou",
|
||||
"-an-": "an",
|
||||
"-en-": "en",
|
||||
"-ang-": "ah",
|
||||
"-eng-": "eg",
|
||||
"-ao-": "ao",
|
||||
"-er-": "er",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"ve": "t",
|
||||
"ing": "y",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
|
||||
var doublePinyinMSPY = schema{
|
||||
name: "cn_en_mspy",
|
||||
desc: "微软双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_mspy.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oz",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"er": "r",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ing": ";",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ve": "v",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
doublePinyinFlypy = schema{
|
||||
name: "cn_en_flypy",
|
||||
desc: "小鹤双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_flypy.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "aa",
|
||||
"-e-": "ee",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ai",
|
||||
"-ei-": "ei",
|
||||
"-ou-": "ou",
|
||||
"-an-": "an",
|
||||
"-en-": "en",
|
||||
"-ang-": "ah",
|
||||
"-eng-": "eg",
|
||||
"-ao-": "ao",
|
||||
"-er-": "er",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ei": "w",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"ve": "t",
|
||||
"un": "y",
|
||||
"uo": "o",
|
||||
"ie": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"ai": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ing": "k",
|
||||
"uai": "k",
|
||||
"iang": "l",
|
||||
"uang": "l",
|
||||
"ou": "z",
|
||||
"ia": "x",
|
||||
"ua": "x",
|
||||
"ao": "c",
|
||||
"ui": "v",
|
||||
"in": "b",
|
||||
"iao": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
|
||||
var doublePinyinSogou = schema{
|
||||
name: "cn_en_sogou",
|
||||
desc: "搜狗双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_sogou.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oz",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"er": "r",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ing": ";",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ve": "t",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
doublePinyinMSPY = schema{
|
||||
name: "cn_en_mspy",
|
||||
desc: "微软双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_mspy.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oz",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"er": "r",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ing": ";",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ve": "v",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
|
||||
var doublePinyinZiGuang = schema{
|
||||
name: "cn_en_ziguang",
|
||||
desc: "紫光双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_ziguang.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "op",
|
||||
"-ei-": "ok",
|
||||
"-ou-": "oz",
|
||||
"-an-": "or",
|
||||
"-en-": "ow",
|
||||
"-ang-": "os",
|
||||
"-eng-": "ot",
|
||||
"-ao-": "oq",
|
||||
"-er-": "oj",
|
||||
// zh ch sh
|
||||
"zh": "u",
|
||||
"ch": "a",
|
||||
"sh": "i",
|
||||
// 韵母
|
||||
"ao": "q",
|
||||
"en": "w",
|
||||
"an": "r",
|
||||
"eng": "t",
|
||||
"in": "y",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"ai": "p",
|
||||
"ang": "s",
|
||||
"ie": "d",
|
||||
"ian": "f",
|
||||
"iang": "g",
|
||||
"uang": "g",
|
||||
"iong": "h",
|
||||
"ong": "h",
|
||||
"er": "j",
|
||||
"iu": "j",
|
||||
"ei": "k",
|
||||
"uan": "l",
|
||||
"ing": ";",
|
||||
"ou": "z",
|
||||
"ia": "x",
|
||||
"ua": "x",
|
||||
"iao": "b",
|
||||
"ue": "n",
|
||||
"ui": "n",
|
||||
"un": "m",
|
||||
},
|
||||
}
|
||||
doublePinyinSogou = schema{
|
||||
name: "cn_en_sogou",
|
||||
desc: "搜狗双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_sogou.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oz",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "v",
|
||||
"ch": "i",
|
||||
"sh": "u",
|
||||
// 韵母
|
||||
"iu": "q",
|
||||
"ia": "w",
|
||||
"ua": "w",
|
||||
"er": "r",
|
||||
"uan": "r",
|
||||
"ue": "t",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"un": "p",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"iang": "d",
|
||||
"uang": "d",
|
||||
"en": "f",
|
||||
"eng": "g",
|
||||
"ang": "h",
|
||||
"an": "j",
|
||||
"ao": "k",
|
||||
"ai": "l",
|
||||
"ing": ";",
|
||||
"ei": "z",
|
||||
"ie": "x",
|
||||
"iao": "c",
|
||||
"ui": "v",
|
||||
"ve": "t",
|
||||
"ou": "b",
|
||||
"in": "n",
|
||||
"ian": "m",
|
||||
},
|
||||
}
|
||||
|
||||
var doublePinyinABC = schema{
|
||||
name: "cn_en_abc",
|
||||
desc: "智能 ABC 双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_abc.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oq",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "a",
|
||||
"ch": "e",
|
||||
"sh": "v",
|
||||
// 韵母
|
||||
"ao": "k",
|
||||
"en": "f",
|
||||
"an": "j",
|
||||
"eng": "g",
|
||||
"in": "c",
|
||||
"uai": "c",
|
||||
"uo": "o",
|
||||
"ai": "l",
|
||||
"ang": "h",
|
||||
"ie": "x",
|
||||
"ian": "w",
|
||||
"iang": "t",
|
||||
"uang": "t",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"er": "r",
|
||||
"iu": "r",
|
||||
"ei": "q",
|
||||
"uan": "p",
|
||||
"ing": "y",
|
||||
"ou": "b",
|
||||
"ia": "d",
|
||||
"ua": "d",
|
||||
"iao": "z",
|
||||
"ue": "m",
|
||||
"ui": "m",
|
||||
"un": "n",
|
||||
},
|
||||
doublePinyinZiGuang = schema{
|
||||
name: "cn_en_ziguang",
|
||||
desc: "紫光双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_ziguang.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "op",
|
||||
"-ei-": "ok",
|
||||
"-ou-": "oz",
|
||||
"-an-": "or",
|
||||
"-en-": "ow",
|
||||
"-ang-": "os",
|
||||
"-eng-": "ot",
|
||||
"-ao-": "oq",
|
||||
"-er-": "oj",
|
||||
// zh ch sh
|
||||
"zh": "u",
|
||||
"ch": "a",
|
||||
"sh": "i",
|
||||
// 韵母
|
||||
"ao": "q",
|
||||
"en": "w",
|
||||
"an": "r",
|
||||
"eng": "t",
|
||||
"in": "y",
|
||||
"uai": "y",
|
||||
"uo": "o",
|
||||
"ai": "p",
|
||||
"ang": "s",
|
||||
"ie": "d",
|
||||
"ian": "f",
|
||||
"iang": "g",
|
||||
"uang": "g",
|
||||
"iong": "h",
|
||||
"ong": "h",
|
||||
"er": "j",
|
||||
"iu": "j",
|
||||
"ei": "k",
|
||||
"uan": "l",
|
||||
"ing": ";",
|
||||
"ou": "z",
|
||||
"ia": "x",
|
||||
"ua": "x",
|
||||
"iao": "b",
|
||||
"ue": "n",
|
||||
"ui": "n",
|
||||
"un": "m",
|
||||
},
|
||||
}
|
||||
|
||||
doublePinyinABC = schema{
|
||||
name: "cn_en_abc",
|
||||
desc: "智能 ABC 双拼",
|
||||
combinationType: "unique",
|
||||
path: filepath.Join(RimeDir, "en_dicts/cn_en_abc.txt"),
|
||||
mapping: map[string]string{
|
||||
// 零声母
|
||||
"-a-": "oa",
|
||||
"-e-": "oe",
|
||||
"-o-": "oo",
|
||||
"-ai-": "ol",
|
||||
"-ei-": "oq",
|
||||
"-ou-": "ob",
|
||||
"-an-": "oj",
|
||||
"-en-": "of",
|
||||
"-ang-": "oh",
|
||||
"-eng-": "og",
|
||||
"-ao-": "ok",
|
||||
"-er-": "or",
|
||||
// zh ch sh
|
||||
"zh": "a",
|
||||
"ch": "e",
|
||||
"sh": "v",
|
||||
// 韵母
|
||||
"ao": "k",
|
||||
"en": "f",
|
||||
"an": "j",
|
||||
"eng": "g",
|
||||
"in": "c",
|
||||
"uai": "c",
|
||||
"uo": "o",
|
||||
"ai": "l",
|
||||
"ang": "h",
|
||||
"ie": "x",
|
||||
"ian": "w",
|
||||
"iang": "t",
|
||||
"uang": "t",
|
||||
"iong": "s",
|
||||
"ong": "s",
|
||||
"er": "r",
|
||||
"iu": "r",
|
||||
"ei": "q",
|
||||
"uan": "p",
|
||||
"ing": "y",
|
||||
"ou": "b",
|
||||
"ia": "d",
|
||||
"ua": "d",
|
||||
"iao": "z",
|
||||
"ue": "m",
|
||||
"ui": "m",
|
||||
"un": "n",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// CnEn 从 others/cn_en.txt 生成全拼和各个双拼的中英混输词库
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package rime
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func getRimeDirForPlatform() string {
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
return filepath.Join(u.HomeDir, ".config", "rime")
|
||||
}
|
||||
@@ -7,24 +7,13 @@ import (
|
||||
"log"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// 获取 macOS/Windows Rime 配置目录
|
||||
func getRimeDir() string {
|
||||
var dir string
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // macOS
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
dir = filepath.Join(u.HomeDir, "Library/Rime")
|
||||
// case "windows": // Windows
|
||||
// dir = getWeaselDir()
|
||||
default:
|
||||
log.Fatalf("Unsupported OS: %s so far", runtime.GOOS)
|
||||
// 获取 macOS Rime 配置目录
|
||||
func getRimeDirForPlatform() string {
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
return dir
|
||||
return filepath.Join(u.HomeDir, "Library/Rime")
|
||||
}
|
||||
|
||||
@@ -7,31 +7,11 @@ import (
|
||||
"golang.org/x/sys/windows/registry"
|
||||
"log"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// 获取 macOS/Windows Rime 配置目录
|
||||
func getRimeDir() string {
|
||||
var dir string
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // macOS
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
dir = filepath.Join(u.HomeDir, "Library/Rime")
|
||||
case "windows": // Windows
|
||||
dir = getWeaselDir()
|
||||
default:
|
||||
log.Fatalf("Unsupported OS: %s so far", runtime.GOOS)
|
||||
}
|
||||
|
||||
return dir
|
||||
}
|
||||
|
||||
func getWeaselDir() string {
|
||||
// 获取 Windows Rime 配置目录
|
||||
func getRimeDirForPlatform() string {
|
||||
keyPath := `Software\Rime\Weasel`
|
||||
valueName := "RimeUserDir"
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ var onlyOne = map[string]string{
|
||||
"给": "gei",
|
||||
}
|
||||
|
||||
func init() {
|
||||
func initPinyin() {
|
||||
// 从 base、ext 准备结巴的词典和词组拼音映射
|
||||
for _, dictPath := range []string{BasePath, ExtPath} {
|
||||
file, err := os.Open(dictPath)
|
||||
|
||||
@@ -30,7 +30,7 @@ var polyphonicWords = []string{
|
||||
// 不检查的词汇
|
||||
var polyphonicWordsFilter = []string{
|
||||
"咀嚼", "倒嚼", "嚼着", "咬文嚼字", "嚼用", "嚼服", "马嚼子", "嚼了", "干嚼", "边嚼边", "嚼舌", "嚼不了", "嚼动", "嚼牙",
|
||||
"淡薄", "姓薄", "微薄", "绵薄", "缘薄", "薄暮", "薄施", "薄言", "儇薄", "鄙薄", "薄的", "薄雾", "薄被", "浇薄", "薄膜", "德薄任重", "德浅行薄", "恶衣薄食", "片长薄技", "薄纸", "硗薄", "薄产", "浅薄", "薄技", "命薄", "薄利", "瘠薄", "凉薄", "薄待", "削薄", "稀薄", "薄地", "喷薄", "薄薪", "薄海", "薄酒", "薄礼", "刻薄", "薄面", "薄命", "磨薄", "薄情", "薄弱", "薄弱地带", "薄弱学校", "薄弱学校改造", "薄志弱行", "薄批细抹", "薄抹灰", "薄伽丘", "薄伽梵", "薄伽梵歌", "薄砂地", "赢得青楼薄幸名", "薄田", "薄物细故", "薄幸", "薄情", "薄葬", "厌薄", "厚积薄发", "履薄临深", "德薄望轻", "菲薄", "履薄", "孤军薄旅", "薄太后", "薄荷",
|
||||
"淡薄", "姓薄", "微薄", "绵薄", "缘薄", "薄暮", "薄施", "薄言", "儇薄", "鄙薄", "薄的", "薄雾", "薄被", "浇薄", "薄膜", "德薄任重", "德浅行薄", "恶衣薄食", "片长薄技", "薄纸", "硗薄", "薄产", "浅薄", "薄技", "命薄", "薄利", "瘠薄", "凉薄", "薄待", "削薄", "稀薄", "薄地", "喷薄", "薄薪", "薄海", "薄酒", "薄礼", "刻薄", "薄面", "薄命", "磨薄", "薄情", "薄弱", "薄弱地带", "薄弱学校", "薄弱学校改造", "薄志弱行", "薄批细抹", "薄抹灰", "薄伽丘", "薄伽梵", "薄伽梵歌", "薄砂地", "赢得青楼薄幸名", "薄田", "薄物细故", "薄幸", "薄情", "薄葬", "厌薄", "厚积薄发", "履薄临深", "德薄望轻", "菲薄", "履薄", "孤军薄旅", "薄太后", "薄荷", "薄云",
|
||||
"剥离", "剥夺", "剥削", "剥落", "剥除", "吞剥", "撕剥", "剥茧", "剥蚀", "剥取", "剥脱", "剥啄", "剥开", "椎肤剥髓", "毕剥", "剥肤之痛", "环剥", "盘剥", "生吞活剥", "山地剥",
|
||||
"熟稔", "黄熟", "谙熟", "熟思", "熟睡", "厮熟", "精熟", "熟虑", "熟字", "熟道", "腐熟", "熟地", "熟手", "熟漆", "熟语", "熟妇", "熟路", "熟识", "熟谙", "熟习", "常熟",
|
||||
"爪哇", "爪儿", "鳞爪", "棘爪", "握爪", "爪子", "爪牙",
|
||||
|
||||
+53
-12
@@ -2,6 +2,7 @@ package rime
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
mapset "github.com/deckarep/golang-set/v2"
|
||||
"log"
|
||||
@@ -21,26 +22,66 @@ type lemma struct {
|
||||
}
|
||||
|
||||
var (
|
||||
mark = "# +_+" // 词库中的标记符号,表示从这行开始进行检查或排序
|
||||
RimeDir = getRimeDir() // Rime 配置目录
|
||||
mark = "# +_+" // 词库中的标记符号,表示从这行开始进行检查或排序
|
||||
RimeDir string
|
||||
EmojiMapPath string
|
||||
EmojiPath string
|
||||
HanziPath string
|
||||
BasePath string
|
||||
ExtPath string
|
||||
TencentPath string
|
||||
HanziSet mapset.Set[string]
|
||||
BaseSet mapset.Set[string]
|
||||
ExtSet mapset.Set[string]
|
||||
TencentSet mapset.Set[string]
|
||||
需要注音TXT string
|
||||
错别字TXT string
|
||||
汉字拼音映射TXT string
|
||||
AutoConfirm bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
// 定义命令行参数
|
||||
flag.StringVar(&RimeDir, "rime_path", "", "Specify the Rime configuration directory")
|
||||
flag.BoolVar(&AutoConfirm, "auto_confirm", false, "Automatically confirm the prompt")
|
||||
flag.Parse()
|
||||
|
||||
RimeDir = getRimeDir(RimeDir) // Rime 配置目录
|
||||
|
||||
EmojiMapPath = filepath.Join(RimeDir, "others/emoji-map.txt")
|
||||
EmojiPath = filepath.Join(RimeDir, "opencc/emoji.txt")
|
||||
EmojiPath = filepath.Join(RimeDir, "opencc/emoji.txt")
|
||||
|
||||
HanziPath = filepath.Join(RimeDir, "cn_dicts/8105.dict.yaml")
|
||||
BasePath = filepath.Join(RimeDir, "cn_dicts/base.dict.yaml")
|
||||
ExtPath = filepath.Join(RimeDir, "cn_dicts/ext.dict.yaml")
|
||||
HanziPath = filepath.Join(RimeDir, "cn_dicts/8105.dict.yaml")
|
||||
BasePath = filepath.Join(RimeDir, "cn_dicts/base.dict.yaml")
|
||||
ExtPath = filepath.Join(RimeDir, "cn_dicts/ext.dict.yaml")
|
||||
TencentPath = filepath.Join(RimeDir, "cn_dicts/tencent.dict.yaml")
|
||||
|
||||
HanziSet = readToSet(HanziPath)
|
||||
BaseSet = readToSet(BasePath)
|
||||
ExtSet = readToSet(ExtPath)
|
||||
HanziSet = readToSet(HanziPath)
|
||||
BaseSet = readToSet(BasePath)
|
||||
ExtSet = readToSet(ExtPath)
|
||||
TencentSet = readToSet(TencentPath)
|
||||
|
||||
需要注音TXT = filepath.Join(RimeDir, "others/script/rime/需要注音.txt")
|
||||
错别字TXT = filepath.Join(RimeDir, "others/script/rime/错别字.txt")
|
||||
需要注音TXT = filepath.Join(RimeDir, "others/script/rime/需要注音.txt")
|
||||
错别字TXT = filepath.Join(RimeDir, "others/script/rime/错别字.txt")
|
||||
汉字拼音映射TXT = filepath.Join(RimeDir, "others/script/rime/汉字拼音映射.txt")
|
||||
)
|
||||
|
||||
initCheck()
|
||||
initSchemas()
|
||||
initPinyin()
|
||||
}
|
||||
|
||||
func getRimeDir(rimePath string) string {
|
||||
if rimePath != "" {
|
||||
absPath, err := filepath.Abs(rimePath)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to get absolute path: %v", err)
|
||||
}
|
||||
// 使用传入的路径
|
||||
return absPath
|
||||
}
|
||||
|
||||
return getRimeDirForPlatform()
|
||||
}
|
||||
|
||||
// 将所有词库读入 set,供检查或排序使用
|
||||
func readToSet(dictPath string) mapset.Set[string] {
|
||||
|
||||
@@ -109,7 +109,7 @@ func Sort(dictPath string, _type int) {
|
||||
// 排序:拼音升序,权重降序,最后直接按 Unicode 编码排序
|
||||
// 英文排序不区分大小写
|
||||
if strings.Contains(dictPath, "en.dict.yaml") {
|
||||
sort.Slice(contents, func(i, j int) bool {
|
||||
sort.SliceStable(contents, func(i, j int) bool {
|
||||
textI, textJ := strings.ToLower(contents[i].text), strings.ToLower(contents[j].text)
|
||||
if strings.HasPrefix(textI, "# ") {
|
||||
textI = textI[2:]
|
||||
@@ -123,7 +123,7 @@ func Sort(dictPath string, _type int) {
|
||||
return false
|
||||
})
|
||||
} else {
|
||||
sort.Slice(contents, func(i, j int) bool {
|
||||
sort.SliceStable(contents, func(i, j int) bool {
|
||||
if contents[i].code != contents[j].code {
|
||||
return contents[i].code < contents[j].code
|
||||
}
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
菈 la
|
||||
咲 xiao
|
||||
螓 qin
|
||||
㨃 dui
|
||||
𤭢 cei
|
||||
# -_- ----------这行下面是要过滤掉的词汇,不进行注音检查----------
|
||||
杭育
|
||||
深厉浅揭
|
||||
@@ -541,6 +543,7 @@
|
||||
猸子
|
||||
艋舺
|
||||
曚昽
|
||||
日光曚昽
|
||||
冖部
|
||||
宀部
|
||||
蠛蠓
|
||||
@@ -819,3 +822,7 @@
|
||||
宕昌
|
||||
宕昌山
|
||||
郦食其
|
||||
蛣蟟
|
||||
擸𢶍
|
||||
蠽蟟
|
||||
秋山燿平
|
||||
|
||||
@@ -1,4 +1,64 @@
|
||||
# 在 # -_- 上面是错词;下面是包含错词但不是错词。
|
||||
清柠
|
||||
塞伯坦
|
||||
辟若
|
||||
辟如
|
||||
既使
|
||||
爱物及乌
|
||||
爱屋吉屋
|
||||
匕手
|
||||
优惠卷
|
||||
凭心而论
|
||||
为之一震
|
||||
恍荡
|
||||
濠沟
|
||||
活性碳
|
||||
烟雾迷漫
|
||||
风雪弥漫
|
||||
非份之想
|
||||
丁子裤
|
||||
稍做
|
||||
何尔萌
|
||||
贺尔蒙
|
||||
金钢砂
|
||||
金钢石
|
||||
金钢网
|
||||
金钢钻
|
||||
金钢狼
|
||||
于此无关
|
||||
玩弄于鼓掌
|
||||
冒险者工会
|
||||
侯选
|
||||
发酒风
|
||||
撒酒风
|
||||
孕味十足
|
||||
划等号
|
||||
划上等号
|
||||
划句号
|
||||
划上句号
|
||||
划等号
|
||||
男扮女妆
|
||||
女扮男妆
|
||||
扣搜
|
||||
温文而雅
|
||||
增殖税
|
||||
疝气手电筒
|
||||
疝气大灯
|
||||
疝气灯
|
||||
大相迳庭
|
||||
买帐
|
||||
记帐
|
||||
分类帐
|
||||
到帐
|
||||
认帐
|
||||
纨裤
|
||||
银行帐
|
||||
夏侯敦
|
||||
看的出
|
||||
天侯
|
||||
喜剧届
|
||||
音乐届
|
||||
体育届
|
||||
目步转睛
|
||||
奥门
|
||||
三圾
|
||||
@@ -844,6 +904,7 @@
|
||||
得象
|
||||
很象
|
||||
就象
|
||||
太象
|
||||
网络迷踪
|
||||
独竖一帜
|
||||
摄相
|
||||
@@ -2092,6 +2153,9 @@
|
||||
工夫不负有心人
|
||||
元珠笔
|
||||
凉溲溲
|
||||
凉嗖嗖
|
||||
冷嗖嗖
|
||||
风嗖嗖
|
||||
四不象
|
||||
四不相
|
||||
黄梁
|
||||
@@ -3973,3 +4037,4 @@
|
||||
脉轮理论
|
||||
皮带手表
|
||||
钢带手表
|
||||
活性碳酸钙
|
||||
|
||||
+24171
-1
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
schema:
|
||||
schema_id: radical_pinyin
|
||||
name: "部件拆字 | 全拼双拼"
|
||||
version: "1.1.0"
|
||||
version: "2.0.0"
|
||||
author: Mirtle
|
||||
description: |
|
||||
用拼音按顺序打出偏旁部件,组合出汉字
|
||||
@@ -271,3 +271,5 @@ algebra_ziguang:
|
||||
- xform/an(?=^|$|')/<r>/
|
||||
- xform/'|<|>//
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ long_word_filter = require("long_word_filter")
|
||||
-- 在 engine/filters 增加 - lua_filter@cn_en_spacer
|
||||
cn_en_spacer = require("cn_en_spacer")
|
||||
|
||||
-- 英文词条上屏自动空格
|
||||
-- 在 engine/filters 增加 - lua_filter@en_spacer
|
||||
-- 英文词条上屏自动添加空格
|
||||
-- 在 engine/filters 的倒数第二个位置,增加 - lua_filter@en_spacer
|
||||
en_spacer = require("en_spacer")
|
||||
|
||||
-- 九宫格,将输入框的数字转为对应的拼音或英文,iRime 用,Hamster 不需要。
|
||||
|
||||
+8
-20
@@ -61,30 +61,18 @@ Z Z
|
||||
7 qi
|
||||
8 ba
|
||||
9 jiu
|
||||
# 示例:输入 siSdian 得到 4S店
|
||||
3G
|
||||
4G
|
||||
5G
|
||||
3G网络
|
||||
4G网络
|
||||
5G网络
|
||||
3G流量
|
||||
4G流量
|
||||
5G流量
|
||||
2D
|
||||
3D
|
||||
4D
|
||||
3D打印
|
||||
2D电影
|
||||
3D电影
|
||||
4S店
|
||||
AE86
|
||||
|
||||
# 示例:输入 sanDdayin 得到 3D打印
|
||||
M1
|
||||
M2
|
||||
M3
|
||||
M4
|
||||
M4A1
|
||||
|
||||
3G
|
||||
4G
|
||||
5G
|
||||
2D
|
||||
4D
|
||||
3D打印
|
||||
|
||||
# 加入词典,响应 opencc/others.txt 的 emoji 集合
|
||||
V动物
|
||||
|
||||
+16
-14
@@ -126,7 +126,7 @@ reduce_english_filter:
|
||||
words: [
|
||||
aid, ann,
|
||||
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bach, bench, bush,
|
||||
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
|
||||
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn, don,
|
||||
fab, fax, fob, fog, foul, fur,
|
||||
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
||||
@@ -140,9 +140,10 @@ reduce_english_filter:
|
||||
rand, rant, rent, rep, res, ret, rex, rib, rid, rig, rim, rub, rug, rum, runc, runs, ranch,
|
||||
sac, sail, sal, sam, sans, sap, saw, sax, sew, sham, shaw, shin, sig, sin, sip, sis, suit, sung, suns, sup, sur, sus,
|
||||
tad, tail, taj, tar, tax, tec, ted, tel, ter, tex, tic, tied, tier, ties, tim, tin, tit, tour, tout, tum,
|
||||
wag, wand, womens, wap, wax, weir, won,
|
||||
wag, wand, womens, wap, wax, weir, won, went,
|
||||
yan, yen,
|
||||
zach
|
||||
zach,
|
||||
my, mt, dj, as, js, cs, ak, ps, cd, cn, hk, bt, pk, ml # 一些由算法转写的大写单词编码,会影响简拼(全拼专有)
|
||||
]
|
||||
|
||||
|
||||
@@ -289,19 +290,20 @@ pin_cand_filter:
|
||||
|
||||
# 主翻译器,拼音
|
||||
translator:
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
initial_quality: 1.2 # 拼音的权重应该比英文大
|
||||
comment_format: # 标记拼音注释,供 corrector.lua 做判断用
|
||||
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
||||
enable_word_completion: true # 大于 4 音节的词条自动补全,librime > 1.11.2
|
||||
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
||||
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
||||
initial_quality: 1.2 # 拼音的权重应该比英文大
|
||||
comment_format: # 标记拼音注释,供 corrector.lua 做判断用
|
||||
- xform/^/[/
|
||||
- xform/$/]/
|
||||
preedit_format: # preedit_format 影响到输入框的显示和“Shift+回车”上屏的字符
|
||||
- xform/([jqxy])v/$1u/ # 显示为 ju qu xu yu
|
||||
# - xform/([nl])v/$1ü/ # 显示为 nü lü
|
||||
# - xform/([nl])ue/$1üe/ # 显示为 nüe lüe
|
||||
- xform/([nl])v/$1v/ # 显示为 nv lv
|
||||
- xform/([nl])ue/$1ve/ # 显示为 nve lve
|
||||
preedit_format: # preedit_format 影响到输入框的显示和“Shift+回车”上屏的字符
|
||||
- xform/([jqxy])v/$1u/ # 显示为 ju qu xu yu
|
||||
# - xform/([nl])v/$1ü/ # 显示为 nü lü
|
||||
# - xform/([nl])ue/$1üe/ # 显示为 nüe lüe
|
||||
- xform/([nl])v/$1v/ # 显示为 nv lv
|
||||
- xform/([nl])ue/$1ve/ # 显示为 nve lve
|
||||
|
||||
|
||||
# 次翻译器,英文
|
||||
|
||||
+80
-53
@@ -10,14 +10,14 @@
|
||||
|
||||
|
||||
# 要比共享目录的同名文件的 config_version 大才可以生效
|
||||
config_version: '2023-02-27'
|
||||
config_version: '2024-11-04' # config_version: '1.0'
|
||||
|
||||
|
||||
# options: last | default | _custom_
|
||||
# last: the last used latin keyboard layout
|
||||
# default: US (ABC) keyboard layout
|
||||
# _custom_: keyboard layout of your choice, e.g. 'com.apple.keylayout.USExtended' or simply 'USExtended'
|
||||
keyboard_layout: default
|
||||
keyboard_layout: last
|
||||
# for veteran chord-typist
|
||||
chord_duration: 0.1 # seconds
|
||||
# options: always | never | appropriate
|
||||
@@ -38,23 +38,49 @@ style:
|
||||
color_scheme: purity_of_form_custom
|
||||
color_scheme_dark: purity_of_form_custom
|
||||
|
||||
# 预设选项。如果皮肤没写,则使用这些属性;如果皮肤写了,使用皮肤的。
|
||||
text_orientation: horizontal # horizontal | vertical
|
||||
inline_preedit: true
|
||||
corner_radius: 10
|
||||
# 以下是预设选项。如果皮肤没写,则使用这些属性;如果皮肤写了,使用皮肤的。
|
||||
|
||||
# 候选框与文字的排列方式
|
||||
candidate_list_layout: stacked # stacked | linear 皮肤横竖排显示是调整这个
|
||||
text_orientation: horizontal # horizontal | vertical 文字方向
|
||||
# 拼音或词句是否显示在键入位置
|
||||
inline_preedit: true # true | false 键入码显示位置
|
||||
inline_candidate: false # true | false 选中词显示位置
|
||||
|
||||
# Whether candidate panel stick to screen edge to reduce jumping
|
||||
memorize_size: true
|
||||
# Whether transparent colors stack on each other
|
||||
mutual_exclusive: false
|
||||
# Whether to use a translucent background. Only visible when background color is transparent
|
||||
translucency: false
|
||||
|
||||
corner_radius: 7
|
||||
hilited_corner_radius: 0
|
||||
border_height: 0
|
||||
border_width: 0
|
||||
border_height: -2
|
||||
border_width: -2
|
||||
# Space between candidates in stacked layout
|
||||
line_spacing: 5
|
||||
spacing: 10
|
||||
#candidate_format: '%c. %@'
|
||||
#base_offset: 6
|
||||
font_face: 'Lucida Grande'
|
||||
font_point: 21
|
||||
#label_font_face: 'Lucida Grande'
|
||||
label_font_point: 18
|
||||
#comment_font_face: 'Lucida Grande'
|
||||
comment_font_point: 18
|
||||
# Space between preedit and candidates in non-inline mode
|
||||
spacing: 8
|
||||
# A number greater than 0 renders shadow around high-lighted candidate
|
||||
shadow_size: 0
|
||||
# Controls non-hililighted candidate background size, relative to highlighted
|
||||
# Nagetive means shrink, positive meas expand
|
||||
#surrounding_extra_expansion: 0
|
||||
|
||||
# format using %@ and %c is deprecated since 1.0, Squirrel 1.0
|
||||
# %@ is automatically expanded to "[candidate] [comment]"
|
||||
# and %c is replaced by "[label]"
|
||||
candidate_format: '[label]. [candidate] [comment]' # 候选项格式化
|
||||
|
||||
# adjust the base line of text
|
||||
#base_offset: 0
|
||||
font_face: 'Avenir'
|
||||
font_point: 16
|
||||
#label_font_face: 'Avenir'
|
||||
#label_font_point: 12
|
||||
#comment_font_face: 'Avenir'
|
||||
#comment_font_point: 16
|
||||
|
||||
|
||||
# 皮肤列表
|
||||
@@ -73,9 +99,10 @@ preset_color_schemes:
|
||||
comment_font_point: 16
|
||||
# candidate_list_layout: stacked # 候选项排列方向 stacked(默认) | linear
|
||||
# text_orientation: horizontal # 文字排列方向 horizontal(默认) | vertical
|
||||
inline_preedit: true # 拼音位于: 候选框 false | 行内 true
|
||||
translucency: false # 磨砂: false | true
|
||||
mutual_exclusive: false # 色不叠加: false | true
|
||||
inline_preedit: true # 键入码(拼音)是否显示在键入位置 true | false
|
||||
inline_candidate: false # 候选项(词句)是否显示在键入位置 true | false
|
||||
translucency: false # 磨砂: true | false
|
||||
mutual_exclusive: false # 色不叠加: true | false
|
||||
border_height: 0 # 外边框 高
|
||||
border_width: 0 # 外边框 宽
|
||||
corner_radius: 10 # 外边框 圆角半径
|
||||
@@ -103,8 +130,7 @@ preset_color_schemes:
|
||||
# border_color: # 外边框颜色
|
||||
|
||||
|
||||
# 下面是内置的皮肤 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
|
||||
|
||||
# 下面是内置的皮肤 https://github.com/rime/squirrel/blob/master/data/squirrel.yaml
|
||||
|
||||
native:
|
||||
name: 系統配色
|
||||
@@ -262,7 +288,7 @@ preset_color_schemes:
|
||||
clean_white:
|
||||
name: 简约白/Clean White
|
||||
author: Chongyu Zhu <lembacon@gmail.com>, based on 搜狗「简约白」
|
||||
horizontal: true
|
||||
candidate_list_layout: linear
|
||||
candidate_format: '%c %@'
|
||||
corner_radius: 6
|
||||
border_height: 6
|
||||
@@ -282,7 +308,7 @@ preset_color_schemes:
|
||||
apathy:
|
||||
name: 冷漠/Apathy
|
||||
author: LIANG Hai
|
||||
horizontal: true # 水平排列
|
||||
candidate_list_layout: linear # 水平排列
|
||||
inline_preedit: true #单行显示,false双行显示
|
||||
candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间
|
||||
corner_radius: 5 #候选条圆角
|
||||
@@ -301,7 +327,7 @@ preset_color_schemes:
|
||||
dust:
|
||||
name: 浮尘/Dust
|
||||
author: Superoutman <asticosmo@gmail.com>
|
||||
horizontal: true # 水平排列
|
||||
candidate_list_layout: linear # 水平排列
|
||||
inline_preedit: true #单行显示,false双行显示
|
||||
candidate_format: "%c\u2005%@\u2005" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。
|
||||
corner_radius: 2 #候选条圆角
|
||||
@@ -326,7 +352,7 @@ preset_color_schemes:
|
||||
mojave_dark:
|
||||
name: 沙漠夜/Mojave Dark
|
||||
author: xiehuc <xiehuc@gmail.com>
|
||||
horizontal: true # 水平排列
|
||||
candidate_list_layout: linear # 水平排列
|
||||
inline_preedit: true # 单行显示,false双行显示
|
||||
candidate_format: "%c\u2005%@" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。
|
||||
corner_radius: 5 # 候选条圆角
|
||||
@@ -354,34 +380,35 @@ preset_color_schemes:
|
||||
name: 曬經・日/Solarized Light
|
||||
author: 雪齋 <lyc20041@gmail.com>
|
||||
color_space: display_p3 # Only available on macOS 10.12+
|
||||
back_color: 0xf0E5F6FB #Lab 97, 0, 10
|
||||
border_color: 0xf0EDFFFF #Lab 100, 0, 10
|
||||
preedit_back_color: 0xf0D7E8ED #Lab 92, 0, 10
|
||||
candidate_text_color: 0x3942CB #Lab 50, 65, 45
|
||||
label_color: 0x2566C6 #Lab 55, 45, 65
|
||||
comment_text_color: 0x8144C2 #Lab 50, 65, -5
|
||||
text_color: 0x756E5D #Lab 45, -7, -7
|
||||
hilited_back_color: 0xf0C9DADF #Lab 87, 0, 10
|
||||
hilited_candidate_back_color: 0x403516 #Lab 20, -12, -12
|
||||
hilited_candidate_text_color: 0x989F52 #Lab 60, -35, -5
|
||||
hilited_candidate_label_color: 0xCC8947 #Lab 55, -10, -45
|
||||
hilited_comment_text_color: 0x289989 #Lab 60, -20, 65
|
||||
hilited_text_color: 0xBE706D #Lab 50, 15, -45
|
||||
back_color: 0xF0E5F6FB #Lab 97 , 0 , 10
|
||||
border_color: 0xEDFFFF #Lab 100, 0 , 10
|
||||
preedit_back_color: 0x403516 #Lab 20 ,-12,-12
|
||||
#candidate_back_color: 0x403516 #Lab 20 ,-12,-12
|
||||
candidate_text_color: 0x595E00 #Lab 35 ,-35,-5
|
||||
label_color: 0xA36407 #Lab 40 ,-10,-45
|
||||
comment_text_color: 0x005947 #Lab 35 ,-20, 65
|
||||
text_color: 0xA1A095 #Lab 65 ,-5 ,-2
|
||||
hilited_back_color: 0x4C4022 #Lab 25 ,-12,-12
|
||||
hilited_candidate_back_color: 0xD7E8ED #Lab 92 , 0 , 10
|
||||
hilited_candidate_text_color: 0x3942CB #Lab 50 , 65, 45
|
||||
hilited_candidate_label_color: 0x2566C6 #Lab 55 , 45, 65
|
||||
hilited_comment_text_color: 0x8144C2 #Lab 50 , 65,-5
|
||||
hilited_text_color: 0x2C8BAE #Lab 60 , 10, 65
|
||||
|
||||
solarized_dark:
|
||||
name: 曬經・月/Solarized Dark
|
||||
author: 雪齋 <lyc20041@gmail.com>
|
||||
color_space: display_p3 # Only available on macOS 10.12+
|
||||
back_color: 0xf0352A0A #Lab 15, -12, -12
|
||||
border_color: 0xf02A1F00 #Lab 10, -12, -12
|
||||
preedit_back_color: 0xf0403516 #Lab 20, -12, -12
|
||||
candidate_text_color: 0x989F52 #Lab 60, -35, -5
|
||||
label_color: 0xCC8947 #Lab 55, -10, -45
|
||||
comment_text_color: 0x289989 #Lab 60, -20, 65
|
||||
text_color: 0xA1A095 #Lab 65, -05, -02
|
||||
hilited_back_color: 0xf04C4022 #Lab 25, -12, -12
|
||||
hilited_candidate_back_color: 0xD7E8ED #Lab 92, 0, 10
|
||||
hilited_candidate_text_color: 0x3942CB #Lab 50, 65, 45
|
||||
hilited_candidate_label_color: 0x2566C6 #Lab 55, 45, 65
|
||||
hilited_comment_text_color: 0x8144C2 #Lab 50, 65, -5
|
||||
hilited_text_color: 0x2C8BAE #Lab 60, 10, 65
|
||||
back_color: 0xF0352A0A #Lab 15 ,-12,-12
|
||||
border_color: 0x2A1F00 #Lab 10 ,-12,-12
|
||||
preedit_back_color: 0xD7E8ED #Lab 92 , 0 , 10
|
||||
#candidate_back_color: 0xD7E8ED #Lab 92 , 0 , 10
|
||||
candidate_text_color: 0x7389FF #Lab 75 , 65, 45
|
||||
label_color: 0x478DF4 #Lab 70 , 45, 65
|
||||
comment_text_color: 0xC38AFF #Lab 75 , 65,-5
|
||||
text_color: 0x756E5D #Lab 45 ,-7 ,-7
|
||||
hilited_back_color: 0xC9DADF #Lab 87 , 0 , 10
|
||||
hilited_candidate_back_color: 0x403516 #Lab 20 ,-12,-12
|
||||
hilited_candidate_text_color: 0x989F52 #Lab 60 ,-35,-5
|
||||
hilited_candidate_label_color: 0xCC8947 #Lab 55 ,-10,-45
|
||||
hilited_comment_text_color: 0x289989 #Lab 60 ,-20, 65
|
||||
hilited_text_color: 0xBE706D #Lab 50 , 15,-45
|
||||
+15
-9
@@ -6,15 +6,21 @@
|
||||
# Weasel 定制文档 <https://github.com/rime/weasel/wiki/Weasel-定制化>
|
||||
# Weasel 字体设定 <https://github.com/rime/weasel/wiki/字體設定>
|
||||
|
||||
# Weasel 特殊行为的命令行选项
|
||||
# WeaselServer.exe /ascii - CLI 中切换 ASCII 模式
|
||||
# WeaselServer.exe /nascii - CLI 中切换非 ASCII 模式
|
||||
# WeaselSetup.exe /toggleime - 设置系统快捷键用于开启/关闭键盘(0.16.1 以上版本)
|
||||
# WeaselSetup.exe /toggleascii - 设置系统快捷键用于切换 ASCII 模式(0.16.1 以上版本)
|
||||
|
||||
# 部分选项需要将 Weasel 更新 16.0 及以上版本才能生效
|
||||
config_version: "2024-05-14"
|
||||
config_version: "2024-09-25"
|
||||
|
||||
# [app_options]
|
||||
# 针对特定应用的设置
|
||||
app_options:
|
||||
firefox.exe:
|
||||
inline_preedit: true # 行内显示预编辑区:规避 <https://github.com/rime/weasel/issues/946>
|
||||
# cmd.exe: # 带 .exe 的进程名:Weasel 15.0 及之前版本须小写; PR #1049 合并后释出的版本大小写不敏感
|
||||
# cmd.exe: # 带 .exe 的进程名:Weasel 15.0 及之前版本须小写
|
||||
# ascii_mode: true # 英文模式
|
||||
# conhost.exe:
|
||||
# ascii_mode: true
|
||||
@@ -51,9 +57,9 @@ style:
|
||||
font_face: "Segoe UI Emoji, Microsoft YaHei, SF Pro, Noto Color Emoji"
|
||||
label_font_face: "Microsoft YaHei" # 标签字体
|
||||
comment_font_face: "Microsoft YaHei" # 注释字体
|
||||
font_point: 14 # 全局字体字号
|
||||
label_font_point: 14 # 标签字体字号,不设定 fallback 到 font_point
|
||||
comment_font_point: 13 # 注释字体字号,不设定 fallback 到 font_point
|
||||
font_point: 11 # 全局字体字号
|
||||
label_font_point: 12 # 标签字体字号,不设定 fallback 到 font_point
|
||||
comment_font_point: 12 # 注释字体字号,不设定 fallback 到 font_point
|
||||
|
||||
inline_preedit: true # 行内显示预编辑区:true;false
|
||||
preedit_type: composition # 预编辑区内容:composition(编码); preview(选中的候选);preview_all(全部候选)
|
||||
@@ -83,7 +89,7 @@ style:
|
||||
baseline: 0 # 字号百分比,与 linespacing 一同设置可解决字体跳动问题,设置为 0 为禁用
|
||||
linespacing: 0 # 字号百分比,参考 <https://github.com/rime/weasel/pull/1177>
|
||||
align_type: center # 标签、候选文字、注解文字之间的相对对齐方式:top ; center ; bottom
|
||||
max_height: 600 # 候选框最大高度,文本竖排模式下如高度超此尺寸则换列显示候选,设置为 0 不启用此功能
|
||||
max_height: 500 # 候选框最大高度,文本竖排模式下如高度超此尺寸则换列显示候选,设置为 0 不启用此功能
|
||||
max_width: 0 # 候选框最大宽度,horizontal 布局如宽超此尺寸则换行显示候选,设置为 0 不启用此功能
|
||||
min_height: 0 # 候选框最小高度
|
||||
min_width: 10 # 候选框最小宽度
|
||||
@@ -99,9 +105,9 @@ style:
|
||||
shadow_radius: 0 # 阴影区域半径,为 0 不显示阴影;需要同时在配色方案中指定非透明的阴影颜色
|
||||
shadow_offset_x: 4 # 阴影左右偏移距离
|
||||
shadow_offset_y: 4 # 阴影上下偏移距离
|
||||
corner_radius: 8 # 候选窗口圆角半径
|
||||
round_corner: 8 # 候选背景色块圆角半径,又名 hilited_corner_radius
|
||||
# type: vertical # 布局设置,效果和 style 下的设置相同:
|
||||
corner_radius: 0 # 候选窗口圆角半径
|
||||
round_corner: 0 # 候选背景色块圆角半径,又名 hilited_corner_radius
|
||||
type: horizontal # 布局设置,效果和 style 下的设置相同:
|
||||
# horizontal(横向);vertical(竖向) ; vertical_text(竖排文本) ; vertical+fullscreen(全屏) ; horizontal+fullscreen(横向全屏)
|
||||
# [End of <style>]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user