Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: use recipe to config double_pinyin #662

Merged
merged 8 commits into from
Feb 4, 2024
Merged

config: use recipe to config double_pinyin #662

merged 8 commits into from
Feb 4, 2024

Conversation

mirtlecn
Copy link
Collaborator

@mirtlecn mirtlecn commented Feb 3, 2024

一条命令配置双拼:

bash rime-install iDvel/rime-ice:others/recipes/config:schema=flypy
支持的配置:
      - flypy(小鹤双拼,默认)
      - double_pinyin(自然码双拼)
      - mspy(微软双拼)
      - sogou(搜狗双拼)
      - abc(智能 ABC 双拼)
      - ziguang(紫光双拼)

新建了双拼英文词典。

一是因为 plum 应该没有新建词典的能力;
二是,使用双拼,无论如何都一定要新建这些文件,所以不妨直接包含在库中。

@iDvel
Copy link
Owner

iDvel commented Feb 4, 2024

Windows 平台肯定是支持 plum 的

原来是这么用啊。

@iDvel
Copy link
Owner

iDvel commented Feb 4, 2024

这样根目录文件忒多了,我想不如新建一个 双拼补丁 文件夹,里面写上所有双拼的补丁示例和注释,让用户自己复制粘贴一下。
只需要第一次使用的时候操作一次。

@iDvel
Copy link
Owner

iDvel commented Feb 4, 2024

用 2 楼的方法吧,更合理一些,试了一下 user_dict 支持二级目录的写法(translator/dictionary 都是不支持的)。

    - table_translator@cn_en

cn_en:
  dictionary: ""
  user_dict: en_dicts/cn_en
  db_class: stabledb
  enable_completion: true
  enable_sentence: false
  initial_quality: 1.1
  comment_format:
    - xform/^.+$//

还是应该用 stabledb,用 tabledb 的时候不知道为什么 cn_en.txt 在部署后会被格式化,还有删除自造词后,这个词就没了,再也回不来了。

@mirtlecn mirtlecn marked this pull request as draft February 4, 2024 05:34
@mirtlecn mirtlecn marked this pull request as ready for review February 4, 2024 06:40
@iDvel iDvel merged commit 0017a08 into iDvel:main Feb 4, 2024
@mirtlecn mirtlecn deleted the recipe branch February 5, 2024 13:53
@sci-42ver
Copy link

sci-42ver commented Mar 15, 2024

这个 commit 并没有提及 中英混合 情况下处理 全大写字母 derive 的描述,尽管在代码commit里 涉及到了。通过 git log --patch melt_eng.schema.yaml 查看 相关创建和删除的相应commit,其一开始的想法是使用 独立的 dict,不过没merge成功,而是用了另外一种方法 (即) (相关commit 6f51bdd)。

dd95142fb3069a commit message里,“revert” 和 “refactor” 也表明了 merge 失败的情况。

大致机制正如 #344 所说。在 "ⓘTxu" (现在为Txu) 情形下,cn_en 并不使用 melt_eng.schema.yamlderive 规则。所以依然仅 "Txu,txu" 有效 (因为有 T恤 Txu\nT恤 txu 两个词条)。

而 commit 6f51bdd里,- derive/^ⓘ(.+)$/\L$1/ 可以 从 txu derive ⓘtxu 的任意大小写组合,其中包含 ⓘTxu。然后 Txu 本身可以有”T恤“候选项 (尽管有- derive/^(?!ⓘ)./\U$0/)。最后 全大写 类似分析。


以上 仅说明 #345, #344 与此issue相关的commit的联系, 并不指明此commit相关代码是否有错误。希望可以帮助像我一样刚使用此方案并不知晓相关变化的人对配置的理解。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants