dev-master
9999999-devPHP library to work with KANJIDIC2 kanji database
MIT
The Requires
- php >=5.3.0
- symfony/event-dispatcher ~2.4
- symfony/console ~2.4
- kanjidic2/kanjidic2 2.0
afm kanjidic kanjidic2 kanjidic-parser
Wallogit.com
2017 © Pedro Peláez
PHP library to work with KANJIDIC2 kanji database
PHP >= 5.3, (*2)
In order to use this library on another project, you must add the kanjidic2 dictionary file as a Composer repository:, (*3)
"repositories": [
{
"type":"package",
"package": {
"name": "kanjidic2/kanjidic2",
"version": "2.0",
"dist": {
"url": "http://www.csse.monash.edu.au/~jwb/kanjidic2/kanjidic2.xml.gz",
"type": "file"
}
}
}
],
Require this library using composer:, (*4)
composer require albertofem/kanjidic2-lib, (*5)
Install it:, (*6)
composer update albertofem/kanjidic2-lib, (*7)
Test everything is ok:, (*8)
php vendor/albertofem/kanjidic2-lib/bin/kanjidic kanjidic:dictionary:show vendor/kanjidic2/kanjidic2/kanjidic2.xml.gz, (*9)
You should see a large list of kanjis followed by the total count in the dictionary:, (*10)
... 縉繁署者臭艹艹著褐視謁謹賓贈辶逸難響頻 Total dictionary entries: 13108
Create new Kanjidic instance:, (*11)
<?php
use AFM\Kanjidic\Kanjidic;
$kanjidic = new Kanjidic("vendor/kanjidic2/kanjidic2/kanjidic2.xml.gz")
$kanji = $kanjidic->lookByLiteral("世");
See Kanjidic class for more lookup methods, (*12)
This library is under the MIT license., (*13)
PHP library to work with KANJIDIC2 kanji database
MIT
afm kanjidic kanjidic2 kanjidic-parser