RimeがDota 2辞書を追加

私は主にDota 2とCS2をプレイしています。CS2はSteamチャートで常に上位にランクインし、ピーク時の同時接続プレイヤー数が数百万人に達する最大のプレイヤーベースを誇ります。(詳細はhttps://store.steampowered.com/charts/mostplayedをご覧ください)。他のプレイヤーと対戦するのは本当に楽しいです。

プレイするたびに、ジャングルを最初から最後までファームする人、ワードを使わない人、意図的にフィードする人など、変わったプレイヤーに遭遇します。このような状況では、勝利するためには親切なテキストヒントを提供することが不可欠です。

たとえ口論になったとしても、タイピング速度が速いからといって不利になるわけではありません😅。

そのため、入力メソッドには時間を節約するためにDota 2の辞書を組み込む必要があります。例えば、「Necromancer」と入力する方が速くなります。

1. 入力メソッドのインストール

fcitx5はIbusよりもカスタマイズが簡単で、noto-fonts-emojiで絵文字サポートが追加されます。

1sudo pacman -S fctix5-rime
2sudo pacman -S noto-fonts-emoji

私はWusong Pinyinを選択しました。最近は似たようなピンイン版が数多く登場しているようですが、面倒なので気にしていません。今のところこれで十分です。

1sudo pacman -S fctix5-rime
2sudo pacman -S noto-fonts-emoji

私は呉淞撰字を選びました。最近は似たようなピンイン版がたくさんあるようですが、面倒なので気にしていません。今のところは動作します。

1paru -S rime-ice-pinyin-git

2. 呉淞語ピンインのカスタム設定

操作手順は以下のとおりです。

 1➜  ~ cd .local/share/fcitx5
 2➜  fcitx5 ls
 3rime/  themes/
 4➜  fcitx5 pwd
 5/home/mephisto/.local/share/fcitx5
 6➜  fcitx5 cd rime
 7➜  rime pwd
 8/home/mephisto/.local/share/fcitx5/rime
 9➜  rime ls
10build/  cn_dicts/  default.custom.yaml  installation.yaml  luna_pinyin.userdb/  rime_ice.custom.yaml  rime_ice.userdb/  sync/  user.yaml
11➜  rime cat default.custom.yaml
12patch:
13  # 仅使用「雾凇拼音」的默认配置,配置此行即可
14  __include: rime_ice_suggestion:/
15➜  rime cat rime_ice.custom.yaml
16# rime_ice.custom.yaml
17patch:
18  # 显式定义 menu,覆盖 default.yaml 的继承值
19  menu:
20    page_size: 10
21
22  # 添加你的词典
23  import_tables/@next: cn_dicts/dota2
24➜  rime head -n 20 cn_dicts/dota2.dict.yaml
25# Rime dictionary
26# encoding: utf-8
27#
28# Sogou Pinyin Dict - 搜狗细胞词库
29#
30#   https://pinyin.sogou.com/dict/
31#
32# 包括:
33#
34# * dota2
35#
36
37---
38name: dota2
39version: "1.0"
40sort: by_weight
41use_preset_vocabulary: true
42import_tables:
43  - rime_ice        # ← 如果你用的是霧凇拼音,就寫 rime_ice;若用朙月拼音則寫 luna_pinyin

ここで注意すべき点は、fcitx5-rime は /home/mephisto/.local/share/fcitx5/rime の設定を読み込むということです。~/.config/fcitx5/rime に設定しても動作しません。

これはやや非標準的であり、私は多くの時間をかけてテストしましたが、最終的には諦めました。テーマを /home/mephisto/.local/share/fcitx5/themes に置くのは理解できます。

その結果、GitHub の dotfiles リポジトリに置くのが難しくなります。

3. 辞書操作

dota2 dictionary を検索すると、検索エンジンが Sogou Pinyin 辞書を表示します。ダウンロード後、.scel ファイルが作成されます。

1➜  scel git:(master) file dota2.scel
2dota2.scel: data

辞書の変換には、こちらのツール https://github.com/lewangdev/scel2txt を使用してください。もちろん、他にも辞書変換ツールはありますが、このツールで十分です。

Sogou 公式辞書ウェブサイトからダウンロードした*.scelファイルをscelフォルダに配置し、以下のコマンドを実行してください。

1python3 scel2txt.py

ターゲットファイルはoutディレクトリに生成されます。このファイルを/home/mephisto/.local/share/fcitx5/rime/cn_dictsにコピーしてください。

 1➜  rime pwd
 2/home/mephisto/.local/share/fcitx5/rime
 3➜  rime ls
 4build/  cn_dicts/  default.custom.yaml  installation.yaml  luna_pinyin.userdb/  rime_ice.custom.yaml  rime_ice.userdb/  sync/  user.yaml
 5➜  rime head -n 25 cn_dicts/dota2.dict.yaml
 6# Rime dictionary
 7# encoding: utf-8
 8#
 9# Sogou Pinyin Dict - 搜狗细胞词库
10#
11#   https://pinyin.sogou.com/dict/
12#
13# 包括:
14#
15# * dota2
16#
17
18---
19name: dota2
20version: "1.0"
21sort: by_weight
22use_preset_vocabulary: true
23import_tables:
24  - rime_ice        # ← 如果你用的是霧凇拼音,就寫 rime_ice;若用朙月拼音則寫 luna_pinyin
25...
26
27艾欧	ai ou
28矮人直升机	ai ren zhi sheng ji
29矮子	ai zi
30暗夜魔王	an ye mo wang

4. 再起動の確認

設定を有効にするには、コマンドラインで fcitx5 -rd を実行して再起動してください。

確認は画像をご覧ください。「hycms」と入力するとPhantom Lancerが表示されます。さらに、下の画像で0とマークされた候補単語は、絵文字がサポートされていることを示しています。

rime-dota2-dict-emoji

他の辞書のインポートも同様の手順で行います。まず辞書をダウンロードし、Rime に必要な形式に変換し、最後に設定を変更して再起動します。

最終更新日: Saturday, December 13, 2025

このシリーズの投稿:

翻訳: