Using Fuzzy Bopomofo with Rime on Linux with direct input

I recently switched from Hanyu Pinyin to Bopomofo for a more complete Mandarin experience à la Taiwan 🧐. In contrast to Hanyu Pinyin input methods, Bopomofo input methods usually require one to specify the tone of the syllables, which I found to be quite annoying.
Thankfully, I found that Rime Bopomofo supports input without tone marks, so I switched to that. One big advantage of Rime over Chewing or McBopomofo is also that it itself plays nice with my custom keyboard layout (a slight customization of Bone) without any further configuration, though I did have to slightly change the Rime Bopomofo configuration.
Another big advantage of Rime Bopomofo is that I can type Bopomofo itself with the same system.

Setup Guide for fcitx5

First, install Rime Bopomofo by copying the files into ~/.local/share/fcitx5/rime/build.
If you have QWERTY you don’t have to configure anything. If you use e.g. the German QWERTZ, you might want to switch the keyboard layout in the fcitx5 settings to a QWERTY layout, such that the bopomofo aligns even for z and y. Otherwise you probably wan’t to take a look at my bopomofo_tw.custom.yaml and replace 1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- 6347q by your key-values of the keys at QWERTY locations 1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- 6347'.
The same holds for 1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- 6347 and 1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- 6347 ; 1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- and 1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- .

The following are my configuration files in ~/.local/share/fcitx5/rime/:

1
2
3
4
5
6
patch:
  schema_list:
    - schema: bopomofo_tw
  style/inline_preedit: true
  "key_binder/bindings/+":
    - { accept: "Control+Return", when: composing, send: "Shift+Return" }
Code Snippet 1: default.custom.yaml

You can get the bopomofo in the preedit-buffer by pressing β€œShift+Return” by default, but I prefer β€œControl+Return”, hence the keybind in the config.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
patch:
  "key_binder/bindings/+":
    - { accept: adiaeresis, send: "/", when: composing } # Γ€ -> /
    - { accept: adiaeresis, send: "/", when: always }
    - { accept: odiaeresis, send: ";", when: composing } # ΓΆ -> ;
    - { accept: odiaeresis, send: ";", when: always }
    - { accept: udiaeresis, send: "'", when: composing } # ΓΌ -> '
    - { accept: udiaeresis, send: "'", when: always }
  speller/alphabet: "1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- 6347"
  speller/delimiter: "q"
  speller/initials: "1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk-"
  speller/algebra:
    - "erase/^xx$/"
    - "xform/^m(\\d)$/mu$1/"
    - "xform/^r5$/er5/"
    - "xform/iu/iou/"
    - "xform/ui/uei/"
    - "xform/ong/ung/"
    - "xform/^yi?/i/"
    - "xform/^wu?/u/"
    - "xform/iu/v/"
    - "xform/^([jqx])u/$1v/"
    - "xform/([iuv])n/$1en/"
    - "xform/^zhi?/Z/"
    - "xform/^chi?/C/"
    - "xform/^shi?/S/"
    - "xform/^([zcsr])i/$1/"
    - "xform/ai/A/"
    - "xform/ei/I/"
    - "xform/ao/O/"
    - "xform/ou/U/"
    - "xform/ang/K/"
    - "xform/eng/G/"
    - "xform/an/M/"
    - "xform/en/N/"
    - "xform/er/R/"
    - "xform/eh/E/"
    - "xform/([iv])e/$1E/"
    - "abbrev/^([bpmfdtnlgkhjqxZCSrzcs]).+$/$1/"
    - "abbrev/^([A-Za-z]+)\\d$/$1/"
    - "abbrev/^([bpmfdtnlgkhjqxZCSrzcs]).+(\\d)$/$1$2/"
    - "xlit|bpmfdtnlgkhjqxZCSrzcsiuvaoeEAIOUMNKGR12345|1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- 6347|"
  translator/preedit_format:
    - "xlit|1jcf2dtvui'ae/5xo;pbyhnz8lr,9ms.0wgk- 6347q|γ„…γ„†γ„‡γ„ˆγ„‰γ„Šγ„‹γ„Œγ„γ„Žγ„γ„γ„‘γ„’γ„“γ„”γ„•γ„–γ„—γ„˜γ„™γ„§γ„¨γ„©γ„šγ„›γ„œγ„γ„žγ„Ÿγ„ γ„‘γ„’γ„£γ„€γ„₯γ„¦Λ‰ΛŠΛ‡Λ‹Λ™ |"
Code Snippet 2: bopomofo_tw.custom.yaml
Built with Hugo
Theme Stack designed by Jimmy