rime / home

Rime::Home is home to Rime users and developers
https://rime.im
4.27k stars 231 forks source link

如何以简体方式保存用户词库? #1521

Closed hwypengsir closed 6 months ago

hwypengsir commented 6 months ago

我在配置文件中,将简化汉字作为默认的屏幕显示:

vim  luna_pinyin.custom.yaml
# encoding: utf-8
patch:
  #设定简化字为默认选项
  switches:
    - name: ascii_mode
      reset: 0
      states: ["中文", "西文"]
    - name: full_shape
      states: ["半角", "全角"]
    - name: simplification
      reset: 1
      states: ["漢字", "汉字"]
    - name: ascii_punct
      states: ["。,", ".,"]

用python查看用户词库(ibus-rime):

import plyvel
dbfile = '/home/debian/.config/ibus/rime/luna_pinyin.userdb'
db = plyvel.DB(dbfile)
for k,v in db:
    print(k.decode('UTF8'),v)

发现,里面使用繁体存放的,

bo bing     薄餅 b'c=1 d=1 t=960'
cang shu    倉鼠 b'c=1 d=1 t=906'
cha hua     插話 b'c=1 d=1 t=219'

可否设置成以简体的形式保存我的用户词库记录呢?

ksqsf commented 6 months ago

用户词库保留的是词库中实际存在的词,词库如果是繁体,那么用户词库也会是繁体。

如果非常在意此事,可以改用原生简体词库方案,如雾凇拼音

lotem commented 6 months ago

不對。是 简化字拼音