V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
kestrelBright
V2EX  ›  程序员

雾凇拼音如何打补丁使用自己的自定义文本?

  •  
  •   kestrelBright · 9 天前 · 774 次点击

    使用的小企鹅输入法 在~/.local/rime 下面直接拉的雾凇拼音 然后文件都没动

    rime 目录下复制了一个 custom_phrase.txt 为 my_phrase.txt 然后在 txt 最下面添加了

    [email protected]	gmail
    

    rime 目录新建了 default.custom.yaml

    patch:
      "engine/translators/+":
        - table_translator@my_phrase
    
      my_phrase:
        dictionary: ""
        user_dict: my_phrase  # 可以修改这里,改成自己的 txt 文件
        db_class: stabledb        # 只读数据库,无法动态调频;设为 tabledb 可以动态调频
        enable_completion: false  # 补全提示
        enable_sentence: false    # 禁止造句
        initial_quality: 99
    

    也尝试过复制 rime_ice.schema.yaml 的 engine/translators 加入 table_translator@my_phrase 也不行

    输入 gmail 自定义的邮箱没出来

    如果直接修改 rime_ice.schema.yaml 文件里的 engine/translators 加入 table_translator@my_phrase 和 my_phrase 又可以

    6 条回复    2025-07-25 09:10:18 +08:00
    HeyHollis
        1
    HeyHollis  
       8 天前
    我用的是雾凇拼音的小鹤双拼方案。建了一个 double_pinyin_flypy.custom.yaml ,内容是

    ``` yaml
    patch:
    # 挂载自定义词库
    translator/dictionary: rime_ice_custom
    # (按需选择)清空 preedit_format 中的内容,输入时显示双拼编码
    translator/preedit_format: []
    custom_phrase/user_dict: custom_phrases_flypy
    ```

    然后自定义短语写在 custom_phrases_flypy.txt 里。
    kestrelBright
        2
    kestrelBright  
    OP
       8 天前
    @HeyHollis 我只想更改自定义短语的文件 那只需要一句 custom_phrase/user_dict: my_phrases 对吧。。。但还是无效
    orzfly
        3
    orzfly  
       8 天前
    盲猜也许你需要在 rime_ice.custom.yaml 写,而不是 default.custom.yaml 。
    kestrelBright
        4
    kestrelBright  
    OP
       8 天前 via iPhone
    @orzfly 是的 直接修改原文件有效 但不利于更新
    orzfly
        5
    orzfly  
       8 天前
    @kestrelBright 可是我说的是 rime_ice.custom.yaml ,不是 rime_ice.schema.yaml
    kestrelBright
        6
    kestrelBright  
    OP
       7 天前 via iPhone
    @orzfly 再加一个 custom 把 custom_phrase 项移入还是无效
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1140 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 23:43 · PVG 07:43 · LAX 16:43 · JFK 19:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.