Skip to content
Zach Leigh edited this page Apr 24, 2016 · 6 revisions

Contents

Ubuntu Script

For Ubuntu users (and likely all Debian based systems), use the script included in this repo to install MeCab and php-mecab. Script details can be found here. Once the dependencies are installed, install Limelight.

Install Mecab

Before using Limelight, you must install MeCab and its dictionary files. Linux users can find MeCab in their distributions repositories.
For Ubuntu/Debian users:

sudo apt-get install mecab mecab-ipadic-utf8

Mac OS X users download the MeCab source and the dictionary files and build the package using Xcode.

Windows users can download the installer.

Additional info can be found here.

Install php-mecab

The package php-mecab provides MeCab bindings for php. Linux and Mac users can try this installation script.

sh ./install-php-mecab.sh 

If it doesn't work, see here for more detailed instructions.

Windows users can install php-mecab like any other php extension. Check the php documentation for details.

Install Limelight

Once MeCab and php-mecab are installed and working, install Limelight through composer.

composer require nihongodera/limelight

If your MeCab installation requires a dictionary directory to initialize, set it in config.php in the Binding Options section.

'options' => [
    'PhpMecab' => [
        // '-d' => 'path/to/your/dic/directory'
    ]
]

For use in Laravel, see the Laravel support page.