rime / librime

Rime Input Method Engine, the core library

Home Page:https://rime.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

用不同拼写运算构建的prism在副翻译器中索引同一个table.bin文件

hoofcushion opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
我想用不同拼写运算的prism索引同一个table.bin文件,但这是不行的,table.bin似乎与prism绑定。

image

这种写法无效↑

image
image

目前能用的写法是,先复制一份词库和方案,再重新部署,构建出另一套table.bin

image

最后在副翻译器中以词库名调用

Describe the solution you'd like
我希望的解决方案是,对于使用了相同词库,不同拼写运算的方案,允许使用不同的prism索引同一份词库,会更加方便,也不用多次编译同一份词库。

image
类似这样

Describe alternatives you've considered
Additional context

https://github.com/rime/rime-middle-chinese 部署这两个方案,会生成zyenpheng.prism.bin和sampheng.prism.bin,它们共用一个zyenpheng.table.bin

commented

这只在主翻译器下生效,副翻译器下无效。
怎么打开议题?

佈署 建立字典 bin 檔 只要下列組參數即可
schema_list --> cangjie5 --> cangjie5v

default.yaml

schema_list:
   - cangjie5

在主方案 中的 cangjie5.schema.yaml

schema/dependencies:
    - cangjie5v   # 加入 
engine/translators:
    - table_translator #  主字典
    - table_translator@cangjie5v # 使用 cangjie5v.prism  的副字典
translator:
    .......
cangjie5v:
    ....
    prism: cangjie5v
# Rime schema settings
# encoding: utf-8
# 方案.schema.yaml
#
#

patch:    # desable include custom.yaml


schema:
  schema_id:  cangjie5v
speller:
  algebra:
    - xform/^([a-z;,]).([a-z;,])$/$1$2\?/  # 取首尾二碼爲反查三碼字
    - xform/^([a-z;,])..([a-z;,])$/$1$2\?\?/  # 取首尾二碼爲速成碼反查四碼字
    - xform/^([a-z;,])...([a-z;,])$/$1$2\?\?\?/  # 取首尾二碼爲速成碼反查五碼字
    #- xlit|abcdefghijklmnopqrstuvwxyz|dmatwfyzljxiekbhsocrugqnpv|
translator:
  dictionary: cangjie5  #    
  prism:  cangjie5v  #  依speller/algebra 重製 prism   cangjie5v.prism.bin
commented

佈署 建立字典 bin 檔 只要下列組參數即可 schema_list --> cangjie5 --> cangjie5v
...

虽然建立了不同 prism,可是其他翻译器却不能借用。