咁撚蠢仲學人買公司整open source
方唔係又搭雞棚呃錢
~/.config/ibus/rime/
├── default.custom.yaml
├── jiufang.schema.yaml
└── jiufang.dict.yaml
default.custom.yaml
裡把新 schema 加到列表: patch:
# 輸入方案列表,依次切換
schema_list:
- jiufang # 我們的九方
- luna_pinyin # 你原本的拼音
- buc_pinyin # ……
jiufang.schema.yaml
,告訴 Rime 如何載入字典、如何拆碼: ---
schema:
schema_id: jiufang
name: "九方輸入法"
version: "0.1"
author: "Your Name <you@example.com>"
description: "基於九方拆字邏輯的開源輸入法"
# 畫面選字每頁顯示 9 個候選
patch:
menu/page_size: 9
# 核心引擎流程
engine:
processors:
- ascii_composer # 英數輸入
- recognizer
- key_binder
- speller # 字根拆碼
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
translators:
- dictionary # 據 code 查字
filters: []
renderer:
name: simple # 用最簡渲染
# 拆碼器設定:字母表+最長拆入碼長度
speller:
alphabet: "abcdefghijklmnopqrstuvwxyz"
max_code_length: 4 # 九方最長 4 碼
# 誰是字典:對應下面的 jiufang.dict.yaml
translator:
dictionary:
- jiufang
# 空格鍵選字
key_binder:
bindings:
- { when: composing, accept: space, commit: 1 }
jiufang.dict.yaml
,把「九方拆字碼 → 字」映射列進去。這裡只示範幾筆,完整表請依官方或社群 reverse-engineer 加進來: ---
# name, version 可隨意
name: "九方輸入法字典"
version: "0.1"
sort: by_weight
use_preset_vocabulary: false
import_tables:
- ascii_full
dictionary:
# 範例:code: 拆字結果;word: 對應字
- { code: "1111", word: "一" }
- { code: "1123", word: "我" }
- { code: "1324", word: "明" }
- { code: "2413", word: "天" }
- { code: "3342", word: "想" }
# ……把完整九方拆字表和大字頻詞庫都補進來
~/Library/Rime/
;Linux 下 ibus-rime 是 ~/.config/ibus/rime/
)執行