Difference between revisions of "Mozc"
m (typo) |
m (→Use CapsLock as Eisu_toggle key on ASCII layout keyboard) |
||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Internationalization]] | [[Category:Internationalization]] | ||
[[ja:Mozc]] | [[ja:Mozc]] | ||
− | [http://code.google.com/p/mozc/ Mozc | + | From the project [http://code.google.com/p/mozc/ home page]: |
+ | : ''Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux. This open-source project originates from [http://www.google.com/intl/ja/ime/ Google Japanese Input]. Detailed differences between Mozc and Google Japanese Input are described in [http://code.google.com/p/mozc/wiki/AboutMozc About Mozc]'' (In short, Mozc does not have equivalent conversion quality to Google Japanese Input). | ||
== Installation == | == Installation == | ||
+ | |||
+ | You can install {{AUR|mozc}} (vanilla) using [[#Unofficial user repository|unofficial user repository]] or build yourself from [[AUR]]. | ||
+ | |||
{{Note|Mozc works with {{Pkg|ibus}}. Please see also [[IBus]] for installation and configuration.}} | {{Note|Mozc works with {{Pkg|ibus}}. Please see also [[IBus]] for installation and configuration.}} | ||
− | + | This package consists as follows: | |
{| class="wikitable" style="text-align:center;margin:0 2em auto" | {| class="wikitable" style="text-align:center;margin:0 2em auto" | ||
!Package !! mozc !! description | !Package !! mozc !! description | ||
Line 20: | Line 24: | ||
|} | |} | ||
− | === | + | {{Tip|[[#Variants on AUR|Unofficial plugins for the other IM frameworks are available]]}} |
− | There is an unofficial user repository of Mozc. Add the following into your /etc/pacman.conf: | + | |
− | + | === Unofficial user repository === | |
− | + | ||
+ | There is an unofficial user repository of Mozc. Add the following into your {{ic|/etc/pacman.conf}}: | ||
+ | {{bc|<nowiki> | ||
+ | [pnsft-pur] | ||
+ | SigLevel = Optional TrustAll | ||
+ | Server = http://downloads.sourceforge.net/project/pnsft-aur/pur/$arch | ||
+ | </nowiki>}} | ||
{{Note|This repo provides x86_64 packages only now.}} | {{Note|This repo provides x86_64 packages only now.}} | ||
− | And refresh package database | + | And refresh package database. |
− | + | You can choose to install packages specifying group name as follows: | |
− | You can choose install packages specifying group name as follows: | ||
# pacman -S mozc-im | # pacman -S mozc-im | ||
Or, specify package names directly. For example: | Or, specify package names directly. For example: | ||
# pacman -S mozc ibus-mozc emacs-mozc | # pacman -S mozc ibus-mozc emacs-mozc | ||
− | === | + | === Using PKGBUILD === |
− | + | ||
− | + | You can install from AUR as follows. | |
− | |||
− | |||
− | |||
− | |||
− | |||
First, get {{AUR|mozc}} tarball from AUR and edit the PKGBUILD if necessary. | First, get {{AUR|mozc}} tarball from AUR and edit the PKGBUILD if necessary. | ||
$ wget https://aur.archlinux.org/packages/mo/mozc/mozc.tar.gz | $ wget https://aur.archlinux.org/packages/mo/mozc/mozc.tar.gz | ||
Line 46: | Line 50: | ||
$ cd mozc | $ cd mozc | ||
− | If you will be using mozc.el on Emacs, uncomment {{ | + | If you will be using mozc.el on Emacs, uncomment {{ic|_emacs_mozc}} line. |
## If you will be using mozc.el on Emacs, uncomment below. | ## If you will be using mozc.el on Emacs, uncomment below. | ||
_emacs_mozc="yes" | _emacs_mozc="yes" | ||
− | === | + | === Make available Mozc === |
− | |||
− | |||
− | |||
Restart X or IBus to enable use of Mozc. | Restart X or IBus to enable use of Mozc. | ||
+ | |||
+ | === Variants on AUR === | ||
+ | |||
+ | Each packages consist as follows: | ||
+ | {| class="wikitable" style="text-align:center;margin:0 2em auto" | ||
+ | !Package !! mozc !! mozc-svn !! mozc-ut !! mozc-fcitx !! description | ||
+ | |- | ||
+ | !Group | ||
+ | | mozc-im || mozc-im-svn || mozc-im || mozc-im || | ||
+ | |- | ||
+ | !rowspan="6" | Component | ||
+ | | mozc || mozc-svn || mozc-ut || -- ||Server part of the Mozc | ||
+ | |- | ||
+ | | ibus-mozc || ibus-mozc-svn || ibus-mozc-ut || -- || IBus engine module (optional) | ||
+ | |- | ||
+ | | (uim-mozc) || uim-mozc-svn || uim-mozc-ut || -- || uim plugin module (optional) | ||
+ | |- | ||
+ | | <small>''N/A''</small> || fcitx-mozc-svn || <small>''N/A''</small> || -- || Fcitx module (optional) | ||
+ | |- | ||
+ | | emacs-mozc || emacs-mozc-svn || emacs-mozc-ut || -- || Mozc for Emacs (optional) | ||
+ | |- | ||
+ | | -- || -- || -- || mozc-fcitx || mozc-fcitx package (all in one) | ||
+ | |} | ||
+ | |||
+ | ==== uim-mozc ==== | ||
+ | |||
+ | Though {{AUR|mozc}} adapts to only IBus input method framework, [http://code.google.com/p/macuim/ macuim] provides ''uim-mozc'' plugin. {{AUR|uim-mozc}} is for vanilla ''mozc'' and {{AUR|mozc-ut}}, {{AUR|mozc-svn}} can build ''uim-mozc'' itself (see [[Input Japanese using uim]]). You can install ''uim-mozc'' from [[#Unofficial user repository|unofficial user repository]] as well as vanilla ''mozc''. | ||
+ | |||
+ | ==== mozc-ut ==== | ||
+ | |||
+ | {{AUR|mozc-ut}} comes with [http://www.geocities.jp/ep3797/mozc_01.html Mozc UT dictionary] and can build ''uim-mozc''. The dictionary adds over 350,000 words into original. | ||
+ | {{Note| | ||
+ | * Building ''mozc-ut'' requires long time to generate dictionary seed. | ||
+ | * ''mozc-ut'' can work with ''ibus-mozc'', ''emacs-mozc'' and ''uim-mozc'' of vanilla ''mozc''. That is, you don't have to build such as modules of ''mozc-ut'' by the use of [[#Unofficial user repository|unofficial user repository]]. | ||
+ | }} | ||
+ | |||
+ | ==== mozc-svn ==== | ||
+ | |||
+ | {{AUR|mozc-svn}} builds using the published svn repository instead of source tarball and can build ''uim-mozc'' and ''fcitx-mozc'' plugin. You should use vanilla ''mozc'' or ''mozc-ut'' unless you have any reason. This is exactly similar to ''mozc'' (published svn repository is not actually trunk) and run-time of makepkg of ''mozc-svn'' will be longer than ''mozc''. | ||
+ | |||
+ | ==== mozc-fcitx ==== | ||
+ | |||
+ | {{AUR|mozc-fcitx}} is all in one Mozc package dedicated to [[Fcitx]]. | ||
== Configuration == | == Configuration == | ||
+ | |||
''See also [[IBus]] for IBus configuration.'' | ''See also [[IBus]] for IBus configuration.'' | ||
− | If you use Mozc by default, set it via ibus-setup: | + | If you use Mozc by default, set it via ''ibus-setup'': |
$ ibus-setup | $ ibus-setup | ||
− | Choose Input Method tab and move Mozc to top of the list. | + | Choose ''Input Method'' tab and move ''Mozc'' to top of the list. |
− | You can switch input method by {{ | + | You can switch input method by {{ic|Alt+Shift_L}} (by IBus default). |
=== Mozc for Emacs === | === Mozc for Emacs === | ||
+ | |||
You can use mozc.el (mozc-mode) to input Japanese via LEIM (Library of Emacs Input Method). To use mozc-mode, write the following into your {{Ic|.emacs.d/init.el}} or some other file for Emacs customizing: | You can use mozc.el (mozc-mode) to input Japanese via LEIM (Library of Emacs Input Method). To use mozc-mode, write the following into your {{Ic|.emacs.d/init.el}} or some other file for Emacs customizing: | ||
(require 'mozc) ; or (load-file "/path/to/mozc.el") | (require 'mozc) ; or (load-file "/path/to/mozc.el") | ||
Line 73: | Line 119: | ||
(setq mozc-candidate-style 'overlay) | (setq mozc-candidate-style 'overlay) | ||
− | {{ | + | {{ic|C-\}} (''toggle-input-method'') enables and disables use of mozc-mode. |
==== Disabling XIM on Emacs ==== | ==== Disabling XIM on Emacs ==== | ||
+ | |||
When you are using input method on your desktop and assigning activation/deactivation of input method to C-SPC, you will be not able to use C-SPC/C-@ as set-mark-command on Emacs. To avoid this problem, add the following into your {{Ic|~/.Xresources}} or {{Ic|~/.Xdefaults}}. xim will be disabled on Emacs. | When you are using input method on your desktop and assigning activation/deactivation of input method to C-SPC, you will be not able to use C-SPC/C-@ as set-mark-command on Emacs. To avoid this problem, add the following into your {{Ic|~/.Xresources}} or {{Ic|~/.Xdefaults}}. xim will be disabled on Emacs. | ||
Emacs*UseXIM: false | Emacs*UseXIM: false | ||
== Tips == | == Tips == | ||
+ | |||
=== Confirming Mozc version which you are using now === | === Confirming Mozc version which you are using now === | ||
+ | |||
Type "ばーじょん" ("version") and convert it while activating Mozc. The version number of Mozc will be shown in the candidate list like follows: | Type "ばーじょん" ("version") and convert it while activating Mozc. The version number of Mozc will be shown in the candidate list like follows: | ||
− | {{ | + | {{hc|<u>ばーじょん</u> |
|バージョン | |バージョン | ||
ヴァージョン | ヴァージョン | ||
Line 90: | Line 139: | ||
=== Launching Mozc tools from command line === | === Launching Mozc tools from command line === | ||
+ | |||
The followings are commands to launch mozc tools. | The followings are commands to launch mozc tools. | ||
− | * Mozc property:{{ | + | * Mozc property: {{ic|1=$ /usr/lib/mozc/mozc_tool --mode=config_dialog}} |
− | * Mozc Dictionary Tool:{{ | + | * Mozc Dictionary Tool: {{ic|1=$ /usr/lib/mozc/mozc_tool --mode=dictionary_tool}} |
− | * Mozc Word Register:{{ | + | * Mozc Word Register: {{ic|1=$ /usr/lib/mozc/mozc_tool --mode=word_register_dialog}} |
− | * Mozc Hand Writing:{{ | + | * Mozc Hand Writing: {{ic|1=$ /usr/lib/mozc/mozc_tool --mode=hand_writing}} |
− | * Mozc Character Palette:{{ | + | * Mozc Character Palette: {{ic|1=$ /usr/lib/mozc/mozc_tool --mode=character_palette}} |
=== Use CapsLock as Eisu_toggle key on ASCII layout keyboard === | === Use CapsLock as Eisu_toggle key on ASCII layout keyboard === | ||
− | |||
− | One of the solution for it is to use CapsLock key as Eisu_toggle (Mozc does not recognize CapsLock key as of r124). The following is way to assign the Eisu_toggle to {{ | + | All of the preset keymap styles of Mozc, command ''ToggleAlphanumericMode'' on ''Composition'' mode is assigned to {{ic|Eisu}} (Eisu_toggle), {{ic|Hiragana/Katakana}} or {{ic|Muhenkan}} key, but the ASCII keyboard has none of them. |
+ | |||
+ | One of the solution for it is to use CapsLock key as Eisu_toggle (Mozc does not recognize CapsLock key as of r124). The following is way to assign the Eisu_toggle to {{ic|CapsLock}} (without any modifier keys) and the Caps_Lock to {{ic|Shift+CapsLock}}, like OADG keyboard layout. | ||
{{Warning|This way affects to desktop wide.}} | {{Warning|This way affects to desktop wide.}} | ||
− | Edit the {{ | + | Edit the {{ic|~/.Xmodmap}} as follows: |
keycode 66 = Eisu_toggle Caps_Lock | keycode 66 = Eisu_toggle Caps_Lock | ||
clear Lock | clear Lock | ||
Then, restart X or run xmodmap to apply immediately: | Then, restart X or run xmodmap to apply immediately: | ||
− | + | $ xmodmap ~/.Xmodmap | |
== Troubleshooting == | == Troubleshooting == | ||
+ | |||
=== Building Mozc fails (process is killed) === | === Building Mozc fails (process is killed) === | ||
+ | |||
If build process is failed with like the following messages: | If build process is failed with like the following messages: | ||
... | ... | ||
Line 121: | Line 174: | ||
=== New version of Mozc does not appear though I upgraded Mozc and restarted X or IBus (not rebooted) === | === New version of Mozc does not appear though I upgraded Mozc and restarted X or IBus (not rebooted) === | ||
− | Old version of Mozc may be still on your memory. Try to kill existing | + | |
+ | Old version of Mozc may be still on your memory. Try to kill existing ''mozc_server'' process: | ||
$ killall mozc_server | $ killall mozc_server | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 04:32, 7 August 2013
From the project home page:
- Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux. This open-source project originates from Google Japanese Input. Detailed differences between Mozc and Google Japanese Input are described in About Mozc (In short, Mozc does not have equivalent conversion quality to Google Japanese Input).
Installation
You can install mozcAUR (vanilla) using unofficial user repository or build yourself from AUR.
This package consists as follows:
Package | mozc | description |
---|---|---|
Group | mozc-im | |
Component | mozc | Server part of the Mozc |
ibus-mozc | IBus engine module | |
emacs-mozc | Mozc for Emacs (optional) |
Unofficial user repository
There is an unofficial user repository of Mozc. Add the following into your /etc/pacman.conf
:
[pnsft-pur] SigLevel = Optional TrustAll Server = http://downloads.sourceforge.net/project/pnsft-aur/pur/$arch
And refresh package database. You can choose to install packages specifying group name as follows:
# pacman -S mozc-im
Or, specify package names directly. For example:
# pacman -S mozc ibus-mozc emacs-mozc
Using PKGBUILD
You can install from AUR as follows.
First, get mozcAUR tarball from AUR and edit the PKGBUILD if necessary.
$ wget https://aur.archlinux.org/packages/mo/mozc/mozc.tar.gz $ tar xvf mozc.tar.gz $ cd mozc
If you will be using mozc.el on Emacs, uncomment _emacs_mozc
line.
## If you will be using mozc.el on Emacs, uncomment below. _emacs_mozc="yes"
Make available Mozc
Restart X or IBus to enable use of Mozc.
Variants on AUR
Each packages consist as follows:
Package | mozc | mozc-svn | mozc-ut | mozc-fcitx | description |
---|---|---|---|---|---|
Group | mozc-im | mozc-im-svn | mozc-im | mozc-im | |
Component | mozc | mozc-svn | mozc-ut | -- | Server part of the Mozc |
ibus-mozc | ibus-mozc-svn | ibus-mozc-ut | -- | IBus engine module (optional) | |
(uim-mozc) | uim-mozc-svn | uim-mozc-ut | -- | uim plugin module (optional) | |
N/A | fcitx-mozc-svn | N/A | -- | Fcitx module (optional) | |
emacs-mozc | emacs-mozc-svn | emacs-mozc-ut | -- | Mozc for Emacs (optional) | |
-- | -- | -- | mozc-fcitx | mozc-fcitx package (all in one) |
uim-mozc
Though mozcAUR adapts to only IBus input method framework, macuim provides uim-mozc plugin. uim-mozcAUR is for vanilla mozc and mozc-utAUR, mozc-svnAUR can build uim-mozc itself (see Input Japanese using uim). You can install uim-mozc from unofficial user repository as well as vanilla mozc.
mozc-ut
mozc-utAUR comes with Mozc UT dictionary and can build uim-mozc. The dictionary adds over 350,000 words into original.
- Building mozc-ut requires long time to generate dictionary seed.
- mozc-ut can work with ibus-mozc, emacs-mozc and uim-mozc of vanilla mozc. That is, you don't have to build such as modules of mozc-ut by the use of unofficial user repository.
mozc-svn
mozc-svnAUR builds using the published svn repository instead of source tarball and can build uim-mozc and fcitx-mozc plugin. You should use vanilla mozc or mozc-ut unless you have any reason. This is exactly similar to mozc (published svn repository is not actually trunk) and run-time of makepkg of mozc-svn will be longer than mozc.
mozc-fcitx
mozc-fcitxAUR is all in one Mozc package dedicated to Fcitx.
Configuration
See also IBus for IBus configuration.
If you use Mozc by default, set it via ibus-setup:
$ ibus-setup
Choose Input Method tab and move Mozc to top of the list.
You can switch input method by Alt+Shift_L
(by IBus default).
Mozc for Emacs
You can use mozc.el (mozc-mode) to input Japanese via LEIM (Library of Emacs Input Method). To use mozc-mode, write the following into your .emacs.d/init.el
or some other file for Emacs customizing:
(require 'mozc) ; or (load-file "/path/to/mozc.el") (setq default-input-method "japanese-mozc")
mozc.el provides "overlay" mode in the styles of showing candidates (from mozc r77) which shows a candidate window in box style close to the point. If you want to use it by default, add the following:
(setq mozc-candidate-style 'overlay)
C-\
(toggle-input-method) enables and disables use of mozc-mode.
Disabling XIM on Emacs
When you are using input method on your desktop and assigning activation/deactivation of input method to C-SPC, you will be not able to use C-SPC/C-@ as set-mark-command on Emacs. To avoid this problem, add the following into your ~/.Xresources
or ~/.Xdefaults
. xim will be disabled on Emacs.
Emacs*UseXIM: false
Tips
Confirming Mozc version which you are using now
Type "ばーじょん" ("version") and convert it while activating Mozc. The version number of Mozc will be shown in the candidate list like follows:
ばーじょん
バージョン ヴァージョン ばーじょん Mozc-1.6.1187.102 ⇐ Current version of Mozc ...
Launching Mozc tools from command line
The followings are commands to launch mozc tools.
- Mozc property:
$ /usr/lib/mozc/mozc_tool --mode=config_dialog
- Mozc Dictionary Tool:
$ /usr/lib/mozc/mozc_tool --mode=dictionary_tool
- Mozc Word Register:
$ /usr/lib/mozc/mozc_tool --mode=word_register_dialog
- Mozc Hand Writing:
$ /usr/lib/mozc/mozc_tool --mode=hand_writing
- Mozc Character Palette:
$ /usr/lib/mozc/mozc_tool --mode=character_palette
Use CapsLock as Eisu_toggle key on ASCII layout keyboard
All of the preset keymap styles of Mozc, command ToggleAlphanumericMode on Composition mode is assigned to Eisu
(Eisu_toggle), Hiragana/Katakana
or Muhenkan
key, but the ASCII keyboard has none of them.
One of the solution for it is to use CapsLock key as Eisu_toggle (Mozc does not recognize CapsLock key as of r124). The following is way to assign the Eisu_toggle to CapsLock
(without any modifier keys) and the Caps_Lock to Shift+CapsLock
, like OADG keyboard layout.
Edit the ~/.Xmodmap
as follows:
keycode 66 = Eisu_toggle Caps_Lock clear Lock
Then, restart X or run xmodmap to apply immediately:
$ xmodmap ~/.Xmodmap
Troubleshooting
Building Mozc fails (process is killed)
If build process is failed with like the following messages:
... /bin/sh: line 1: xxxx killed ... make: *** [xxx/xxx...] error 137 ...
Make sure whether you have run out of memory.
New version of Mozc does not appear though I upgraded Mozc and restarted X or IBus (not rebooted)
Old version of Mozc may be still on your memory. Try to kill existing mozc_server process:
$ killall mozc_server