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

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

Open
hoofcushion opened this issue Jul 9, 2023 · 4 comments

Comments

@hoofcushion
Copy link

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

@eagleoflqj
Copy link
Member

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

@hoofcushion
Copy link
Author

hoofcushion commented Aug 13, 2023

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

@hoofcushion hoofcushion changed the title 用不同拼写运算构建的prism索引同一个table.bin文件 用不同拼写运算构建的prism在副翻译器中索引同一个table.bin文件 Aug 13, 2023
@eagleoflqj eagleoflqj reopened this Aug 13, 2023
@shewer
Copy link
Contributor

shewer commented Aug 15, 2023

佈署 建立字典 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

@hoofcushion
Copy link
Author

hoofcushion commented Oct 13, 2023

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

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

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

No branches or pull requests

3 participants