「インプットメソッド」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(章タイトルのみ翻訳)
8行目: 8行目:
   
 
== インプットメソッド ==
 
== インプットメソッド ==
  +
  +
{{Tip|If parts of the following text show on your screen as gibberish, please make sure you have installed a Chinese or Japanese font on your system. See [[フォント#漢字文化圏]] for a non-exhaustive list of available fonts.}}
  +
  +
{{Note|For the sake of simplicity only the keyboard has been mentioned in the following examples, but an IME can actually work with a number of input sources, such as drawing characters by hand with the mouse or with a [[Wacom タブレット]].}}
   
 
From [[Wikipedia:Input method]]:
 
From [[Wikipedia:Input method]]:
  +
 
:An '''input method''' (or '''input method editor''', commonly abbreviated as IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse operations) that are natively available on their input devices. Using an input method is usually necessary for languages that have more graphemes than there are keys on the keyboard.
 
:An '''input method''' (or '''input method editor''', commonly abbreviated as IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse operations) that are natively available on their input devices. Using an input method is usually necessary for languages that have more graphemes than there are keys on the keyboard.
   
  +
In simpler words, an IME is an application that allows us to use Latin characters in order to type non-Latin characters.
In very simplified terms, an IME is an application that takes Latin characters that you type on your keyboard and outputs them on your screen as non-Latin characters. The IME does this through a process called [[Wikipedia:Romanization|romanization]], which is the transliteration of non-Latin language sounds into the Latin equivalents that most closely resemble them.
 
   
  +
Some IMEs do this through a process called [[Wikipedia:Romanization|romanization]], which is the transliteration of non-Latin language sounds into the Latin equivalents that most closely resemble them. As an example, the Japanese written word for [[Wikipedia:Sake|"sake"]] or "rice wine" is {{ic|'''酒'''}}, also written as {{ic|'''さけ'''}}, and romanized as "sake". The IME's role is to act as a middleman between the keyboard and the input fields, so that when we type "sake" it will intercept the keyboard's input, replace "sake" with {{ic|'''酒'''}} or {{ic|'''さけ'''}} (as chosen by users) and type the native characters for us instead of the keys we pressed.
{{Tip|If parts of the following text show on your screen as gibberish, please make sure you have installed a Japanese font on your system. See [[Localization/Japanese#Fonts]] for a non-exhaustive list of available fonts.}}
 
   
As an example, the Japanese written word for [[Wikipedia:Sake|sake]] is {{ic|''''''}}, also written as {{ic|'''さけ'''}}, and romanized as "sake". The IME's role is to act as a middleman between the keyboard and the screen, so that when we type "sake" it will intercept the keyboard's input, replace "sake" with {{ic|'''酒'''}} or {{ic|'''さけ'''}} (as chosen by us) and put the native characters on the screen instead of what we actually typed.
+
There are also IMEs that do not make use of romanization. One of the most prominent ones, [[Wikipedia:Cangjie input method|Cangjie]], does so by decomposing Chinese characters into their [[Wikipedia:Kangxi radical|radicals]], matching these radicals to a second set of its own internal radicals, and finally matching these internal radicals to the Latin characters. As an example, the Chinese written word for "wine" is also {{ic|'''酒'''}}, which consists of the [[Wikipedia:Kangxi radical|radicals]] {{ic|'''氵'''}}, {{ic|''''''}}, {{ic|'''⼉'''}}, {{ic|'''口'''}} and {{ic|''''''}}. Cangjie matches these radicals to the internal radicals {{ic|'''水'''}}, {{ic|'''一'''}}, {{ic|'''金'''}}, {{ic|'''田'''}} and {{ic|'''一'''}}, and then matches these to the Latin characters {{ic|emcw}}; this means that when we type "emcw", Cangjie will intercept the keyboard's input, replace "emcw" with {{ic|'''酒'''}}, and type that character on the screen.
   
  +
=== Input method framework ===
{{Note|For the sake of simplicity only the keyboard has been mentioned in the example, but an IME can actually produce native characters via a number of ways and input devices, like e.g. drawing characters by hand using a mouse or a [[Wacom tablet]].}}
 
 
=== インプットメソッドフレームワーク ===
 
   
 
Most IMEs work as part of an '''input method framework''' (commonly abbreviated as IMF), which is an application that allows the user to easily switch between different IMEs. In fact, this is the exact same application that many of us unknowingly use everyday to switch between the different Latin keyboard layouts (e.g. English, Spanish, German, etc).
 
Most IMEs work as part of an '''input method framework''' (commonly abbreviated as IMF), which is an application that allows the user to easily switch between different IMEs. In fact, this is the exact same application that many of us unknowingly use everyday to switch between the different Latin keyboard layouts (e.g. English, Spanish, German, etc).
   
  +
The most common IMF is [[IBus]] (often used in [[GTK]]-based environments like [[GNOME]]), followed by [[Scim]], [[Fcitx]]/[[Fcitx5]] (mostly used in [[Qt]]-based environments like [[KDE]]) and [[Uim]]. Very uncommon ones include [[Gcin]], [[Nimf]] and Hime. [https://pkgstats.archlinux.de/compare/packages#packages=fcitx,fcitx5,gcin,hime,ibus,nimf,scim,uim] Additionally, [[Emacs]] is a very popular text editor that has its own internal IMF.
{{Accuracy|1=This is described from a Western point of view (i.e. mine). I know for a fact that in the Eastern hemisphere, things are somewhat different when it comes to IME/IMF popularity and development activity. If these differences should be taken into account, input from native users will be needed.}}
 
 
The most common, most diverse and most well supported input method frameworks are [[Fcitx]] (mostly used in [[KDE]] and other [[Qt]]-based environments) and [[IBus]] (mostly used in [[GNOME]] and other [[GTK]]-based environments). Less common ones include [[Uim]], [[Scim]], [[Hime]], [[Gcin]] and [[Nimf]]. Additionally, [[Emacs]] is a very popular text editor that contains its own internal IMF.
 
   
 
See also [[Wikipedia:List of input methods for Unix platforms]].
 
See also [[Wikipedia:List of input methods for Unix platforms]].
  +
  +
{{Note|SCIM current lacks maintenance and is therefore not recommended.}}
   
 
== 使用可能なインプトメソッドエディターの一覧 ==
 
== 使用可能なインプトメソッドエディターの一覧 ==

2022年2月24日 (木) 13:37時点における版

関連記事

インプットメソッド

ヒント: If parts of the following text show on your screen as gibberish, please make sure you have installed a Chinese or Japanese font on your system. See フォント#漢字文化圏 for a non-exhaustive list of available fonts.
ノート: For the sake of simplicity only the keyboard has been mentioned in the following examples, but an IME can actually work with a number of input sources, such as drawing characters by hand with the mouse or with a Wacom タブレット.

From Wikipedia:Input method:

An input method (or input method editor, commonly abbreviated as IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse operations) that are natively available on their input devices. Using an input method is usually necessary for languages that have more graphemes than there are keys on the keyboard.

In simpler words, an IME is an application that allows us to use Latin characters in order to type non-Latin characters.

Some IMEs do this through a process called romanization, which is the transliteration of non-Latin language sounds into the Latin equivalents that most closely resemble them. As an example, the Japanese written word for "sake" or "rice wine" is , also written as さけ, and romanized as "sake". The IME's role is to act as a middleman between the keyboard and the input fields, so that when we type "sake" it will intercept the keyboard's input, replace "sake" with or さけ (as chosen by users) and type the native characters for us instead of the keys we pressed.

There are also IMEs that do not make use of romanization. One of the most prominent ones, Cangjie, does so by decomposing Chinese characters into their radicals, matching these radicals to a second set of its own internal radicals, and finally matching these internal radicals to the Latin characters. As an example, the Chinese written word for "wine" is also , which consists of the radicals , , , and . Cangjie matches these radicals to the internal radicals , , , and , and then matches these to the Latin characters emcw; this means that when we type "emcw", Cangjie will intercept the keyboard's input, replace "emcw" with , and type that character on the screen.

Input method framework

Most IMEs work as part of an input method framework (commonly abbreviated as IMF), which is an application that allows the user to easily switch between different IMEs. In fact, this is the exact same application that many of us unknowingly use everyday to switch between the different Latin keyboard layouts (e.g. English, Spanish, German, etc).

The most common IMF is IBus (often used in GTK-based environments like GNOME), followed by Scim, Fcitx/Fcitx5 (mostly used in Qt-based environments like KDE) and Uim. Very uncommon ones include Gcin, Nimf and Hime. [1] Additionally, Emacs is a very popular text editor that has its own internal IMF.

See also Wikipedia:List of input methods for Unix platforms.

ノート: SCIM current lacks maintenance and is therefore not recommended.

使用可能なインプトメソッドエディターの一覧

The following table shows the IMEs for the various languages currently available in the Arch repositories and the AUR.

ノート: In some cases, multiple AUR packages exist for the same IME. A good example of this is Mozc: as the currently most popular Japanese IME, multiple packagers have attempted over the years to create the "perfect" Mozc package. In the table below, a single Mozc package has been included for each IMF; but this does not imply that these are the only Mozc packages a user should ever consider to install.
ヒント: Fcitx5 is the successor of Fcitx. It is still fairly new, so some IMEs lack support for it for the time being (though this is something that should be quickly rectified in the coming weeks or months); still, if it covers your needs then you should probably prefer it over the previous version.
この記事またはセクションの正確性には問題があります。
理由: There are a few more IMEs in the repos than what is listed here, especially for Chinese but maybe for other languages too. Again, I'm only including what I'm familiar with or what I could find with a quick scan of the repos and the AUR. For better results we should consult a user who actively uses them. (議論: トーク:インプットメソッド#)
Fcitx Fcitx5 IBus Uim Emacs Scim Hime Gcin Nimf
Chinese
Rime fcitx-rime fcitx5-rime ibus-rime built-in
Sogou fcitx-sogoupinyinAUR
Baidu fcitx-baidupinyinAUR
Chewing fcitx-chewing fcitx5-chewing ibus-chewing scim-chewing built-in
Wubixing built-in built-in ibus-table built-in scim-tablesAUR
Libpinyin fcitx-libpinyin ibus-libpinyin
Google Pinyin fcitx-googlepinyin ibus-googlepinyinAUR
SunPinyin fcitx-sunpinyin ibus-sunpinyin
Japanese
Mozc fcitx-mozc-utAUR fcitx5-mozc ibus-mozc-utAUR uim-mozc-ut2AUR emacs-mozc-utAUR
Anthy fcitx-anthy fcitx5-anthy ibus-anthy built-in built-in built-in built-in
SKK fcitx-skk fcitx5-skk ibus-skk built-in
KKC fcitx-kkc fcitx5-kkc ibus-kkc
Korean
Libhangul fcitx-hangul fcitx5-hangul ibus-hangul built-in scim-hangulAUR built-in
Vietnamese
UniKey fcitx-unikey fcitx5-unikey ibus-unikey
Bamboo ibus-bambooAUR
Indic
m17n fcitx-m17n fcitx5-m17n ibus-m17n scim-m17nAUR
Varnam libvarnam-ibus-gitAUR
Helakuru ibus-helakuruAUR

設定

In order for your desktop environment to properly register an installed input method framework as available and assign it to handle user input, a set of environment variables must be configured accordingly. A good place to do so is /etc/environment.

ノート: If these variables are not set, both GTK and Qt will attempt to read the system's locale settings to determine which IMF they should use, but this process relies on guesswork and can be very error-prone. For a properly working system, you should always opt to explicitly set these variables yourself.
ヒント: If for some reason you wish to completely disable your desktop environment from handling input via an IMF (NOT recommended in GNOME due to tight integration with IBus), then you may either leave these variables unset or, in the case of GTK and Qt, you can replace their values with: GTK_IM_MODULE=gtk-im-context-simple and QT_IM_MODULE=simple.
この記事またはセクションの正確性には問題があります。
理由: There have been reports (even in this Wiki) that these variables sometimes (or maybe in some specific desktop environments like LXDE) do not work as expected, with users claiming that they had to specify xim instead of their IMF. I'm not really sure if these claims are accurate or when exactly they were reported (it might have been years ago, when the IM frameworks were even more of a mess than they are now). For what it's worth, with regards to Fcitx and IBus at least, I haven't had any problem using them in both GTK and Qt environments and applications by only specifying the variables exactly as laid out below. Maybe for Uim and Scim (which don't seem to have been updated much in recent times) the situation is different, but I wouldn't know. (議論: トーク:インプットメソッド#)

Fcitx

See also Fcitx for more information.

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

IBus

See also IBus for more information.

GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

Uim

See also Uim for more information.

GTK_IM_MODULE=uim
QT_IM_MODULE=uim
XMODIFIERS=@im=uim

Emacs

この記事またはセクションの正確性には問題があります。
理由: This needs to be verified. (議論: トーク:インプットメソッド#)

According to this Fcitx wiki entry, "in some case, including emacs and java. Emacs has a historical bug, that under en_US.UTF-8 or similar locale, it will never use XIM (Though emacs is a gtk app, it use XIM). The only way to walkaround this is to use LC_CTYPE to fix this."

Scim

See also Scim for more information.

GTK_IM_MODULE=scim
QT_IM_MODULE=scim
XMODIFIERS=@im=scim

参照