Giter Club home page Giter Club logo

iridium-bpmf's Introduction

Iridium-Bopomofo

銥是化學元素,符號為Ir,原子序為77,屬於鉑系過渡金屬,為質地堅硬易碎的銀白色固體。銥是所有元素中密度第二高的元素(僅次於鋨),而其耐腐蝕性是所有金屬元素中最高,在2000℃高溫下仍然能抵抗腐蝕。 (from Wikipedia)

(又是一個) 基於 RIME、參酌其它注音輸入法習慣、符合臺灣使用習慣為規準的注音輸入方案。

配方: ℞ iridium-bpmf

使用「東風破」 plum 安裝:bash rime-install andy0130tw/iridium-bpmf

字典檔

目前本方案尚依賴 地球拼音terra-pinyin 的字典檔。

(2023/10/10) 內建詞庫改使用由小麥注音輸入法 (McBopomofo, MIT 授權) 經程式轉換而來的詞庫。此詞庫由臺灣人維護,且有定期編修,作者評估其讀音、詞彙、詞頻品質等方面,認為較適合做為預設詞庫檔。轉換程式碼見此

使用者也可以自行下載洋蔥方案增補校對過的字典檔取代之。

示範

demo gif

示範環境為 Pop!_OS 18.04 搭配 gedit。

特色

  • 可不照聲介韻順序輸入,如「ㄋㄠㄧˇ」會自動修正為「ㄋㄧㄠˇ」,改進自 RIME設定檔-注音(google注音+台灣注音習慣)
  • 對新手而言較為直覺的快速鍵綁定,例如用 Backspace 退格時,已完成組字的字會整字刪除,而非逐音節刪除
  • 正確設定繁簡轉換 (行為可在方案選單中切換)
  • 模擬新注音的行為,可以直接用「注音+空格」輸入注音本身、「聲調」鍵直接輸入聲調
  • 將原始 RIME 設計的左右 Shift 對調,使較常用的「左 Shift」的功能變為臨時西文模式
  • 儘可能在設定檔中加上註解,使得客製化更加便利

手動部署方法

以 Ubuntu 搭配 ibus 為例:

  1. 將此專案拷貝到 ~/.config/ibus/rime 下,並將需要的檔案符號連結至該目錄。

    git clone https://github.com/andy0130tw/iridium-bpmf
    ln -s iridium-bpmf/iridium_bpmf.schema.yaml
    ln -s iridium-bpmf/iridium_bpmf_ext.dict.yaml
    ln -s iridium-bpmf/iridium_bpmf_phrase.txt
    ln -s iridium-bpmf/mcbopomofo.dict.yaml

    (或是讀者若會使用 xargs 也可自行簡化此流程)

  2. 依照 default.custom.yaml.ref 新建或修改設定檔補丁 default.custom.yaml

    • schema_list:將本方案加入已啟用的方案列表
    • key_binder/bindings:修改有關移動選單游標的按鍵映射
      注意這個檔案預設使用者是使用橫向選字列表,然而這並非預設行為。如果要使用直向的配置,在此步驟將 send 參數的 Page_{Up,Down} 和其下兩行的對應參數交換。
    • switcher: 新增本方案會用到的開關
  3. 在 Rime 選單上選擇「部署」。

  4. 好耶
    好耶

已測試環境

作者已在以下環境中測試,皆可以正常使用本方案,無明顯功能差異。

  • Ubuntu 18.04 LTS + GNOME + IBus
  • Ubuntu 20.04 LTS + GNOME + IBus
  • Ubuntu 18.04 LTS + Budgie + IBus
  • Debian 10 + fcitx

有在小狼毫 (Windows) 或鼠鬚管 (Mac) 配置過此方案的朋友,歡迎在 Issue tracker 分享。

2022/7/10: 作者入手了一臺 Macbook Air,目前使用鼠鬚管搭配此輸入方案,待測試妥善後會更新此文件。

常見問題

在 IBus 使用橫向選字列表

因為 ibus-rime 的設計細節,在 GNOME 底下 IBus 的選字列表不會遵照 ibus-config 內的方向設定,一律為直向,如圖所示:

直向選字視窗

若要在 IBus 上使用橫向配置,必須明確於 ~/.config/ibus/rime/build/ibus_rime.yaml 檔案指定,如果不存在的話手動建立並加入以下內容,

style:
  horizontal: true

然後重新部署即可。似乎在某個特定版本的 ibus-rime 會自動建立這個檔案,則只要將 horizontal 屬性從 false 改成 true 就好。

實驗

一些與 RIME 有關的嘗試或實驗,為維護方便及維持此專案穩定性,會發佈在另一個 repo,習慣本方案後可以搭配使用。

iridium-bpmf's People

Contributors

andy0130tw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

iridium-bpmf's Issues

請問一些設定的問題

請問以下這兩點,是在哪個yaml 裏面設定? 我好像都找不到..

模擬新注音的行為,可以直接用「注音+空格」輸入注音本身、「聲調」鍵直接輸入聲調
Backspace 退格時,已完成組字的字會整字刪除,而非逐音節刪除

重新佈署後無法輸入中文 都是英文字

我依照說明 git clone 之後
建立 link
然後重新佈署rime
也試著重新啟動 fcitx
但是切換到 rime 之後,按鍵就都是直接輸出英文字,而不是注音
請問我還要注意什麼地方?

這是我的 default.custom.yaml

cat default.custom.yaml 
patch:
  # 1.
  schema_list:
    - schema: iridium_bpmf
    # add more here

  # 2.
  key_binder/bindings:
    # menu navigation keys
    # these bindings are for HORIZONTAL layout, you may need to modify
    # according to your preferred layout
    - { when: has_menu, accept: Up, send: Page_Up }
    - { when: has_menu, accept: Down, send: Page_Down }
    - { when: has_menu, accept: Left, send: Up }
    - { when: has_menu, accept: Right, send: Down }

  # 3.
  switcher/option_list_separator: ' / '
  switcher/save_options:
    - full_shape
    - ascii_punct
    - simplification
    - extended_charset
    - zh_hant
    - zh_hans
    - zh_hant_tw

就直接從 default.custom.yaml.ref 複製出來到 ~/.config/fcitx/rime/default.custom.yaml,沒有修改

定期同步詞庫

建議利用 GitHub actions 等方式,定期將小麥注音輸入法的詞庫轉換後更新至此版本庫,保持兩者同步。

讓按住 shift 時能直接輸入英文、特殊符號

洋蔥的RIME注音設定檔在按住shift時能直接輸出英文及特殊符號,不需要在輸入完成後按enter
我認為這個設定對注音輸入沒有什麼負面作用,還能提升使用方便性

新增 iridium_bpmf.custom.yaml 並寫入以下內容就能達成這個效果
但我不確定替換為 express_editor 會不會造成什麼問題,至少我在目前短暫使用下還沒遇到

patch:
  engine/processors:
    - ascii_composer
    - recognizer
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor

  recognizer/patterns:
    punct: '`[^\s]'
    
  editor/bindings:
    Return: confirm
    KP_Enter: confirm
#以下兩行也是取自洋蔥方案,我認為能緩解大部分注音使用者忘記切換輸入法的困擾
    Shift+Return: commit_raw_input #直出輸入所對應的英文、數字、符號
    Control+Return: commit_script_text #輸出方案使用之顯示編碼(如注音符號)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.