🇯🇵 This is for Japanese only.
MeCab is a third-party program which uses its own dictionaries and parsing algorithm to decompose Japanese sentences into individual words. MeCab may produce more accurate parsing results than Yomitan’s own internal parser.
Note: Homebrew is required for Mac devices.
- Install Python.
- Windows: https://www.python.org/downloads/
- Chocolately:
choco install python
- Chocolately:
- Mac: Run
brew install python3
- Linux: Python is usually included with your distribution.
- Windows: https://www.python.org/downloads/
- Install MeCab.
- Windows: https://taku910.github.io/mecab/#download (In the
Binary package for MS-Windows
header.) - Mac: Simply run
brew install mecab
. - Linux: It depends on your distribution, but most package managers have mecab as a package. Search around for your specific distribution. Make sure to install the dictionary that comes with it, though.
- Ubuntu:
sudo apt install mecab mecab-ipadic-utf8
- Fedora:
sudo dnf install mecab mecab-ipadic
- Arch:
sudo pacman -S mecab-git mecab-ipadic
- Ubuntu:
- Windows: https://taku910.github.io/mecab/#download (In the
- Download and extract this repository to the location you wish to install the files.
- ❗Your downloads folder might not be the best place, as the dictionary files are stored in the same directory.
- Open the directory in a terminal and run
py install_mecab_for_yomitan.py
and follow the instructions.- ❗❗ If you use Firefox or have built Yomitan from source, please refer to the How to find your extension ID section below.
- Go to the Yomitan settings page on your browser.
- Enable advanced options by clicking the toggle switch in the bottom left corner.
- Go to
Text Parsing
. - Enable
Parse sentences using MeCab
and clickMore...
. - Click the
Test
button to see if MeCab was installed correctly.
If you are a Firefox user and/or have built Yomitan from source, you need to obtain the extension ID for Yomitan. If you reinstall Yomitan, MeCab may no longer work for you in this case.
- Chrome/Chromium/Edge:
- Open up your Yomitan settings page. The URL should look something like this:
- (Note: On Edge, the prefix will be
extension://
. Make sure to change this tochrome-extension://
, otherwise it will not work.) - Copy everything before
settings.html
. For example:chrome-extension://mbclianmdhnmblbfecpefmgjhajbioip/
. - ❗Make sure to remember the
chrome-extension://
AND the/
at the end of the ID!! - Then, rerun the script as seen above and when it displays
Add more extension IDs
, paste the extension ID URL that you got. It should work. Continue with the tutorial.
- Firefox:
- Go to
about:debugging
, then selectThis Firefox
at the sidebar. - Scroll until you find Yomitan. It should look like this:
- Now, copy the
Extension ID
. For example:{2d13e145-294e-4ead-9bce-b4644b203a00}
. - Rerun the script as seen above and when it displays
Add more extension IDs
, paste the extension ID with the brackets in the input. It should work. Continue with the tutorial.
- Go to
Why is firefox different?
- That's because, from what I've seen, Firefox gives a unique extension ID for every user, instead of one global one like in the Chrome store. This makes it much trickier to install MeCab.
-
If you try to run the installer again for use on multiple browsers, it will not work. You have to duplicate the repository folder.
-
If you wish to use MeCab on another browser (replacing the old one, same folder), close the browser that has MeCab for Yomitan installed. If you do not do this, you will get a Permission denied error when running the script.
-
Try to close and reopen your browser if it isn't showing
Connection was successful.
. -
If you have any particular issues with installing MeCab, make an issue request. I'll try to help you as fast as possible.