2017 © Pedro Peláez
 

library kanjidic2-lib

PHP library to work with KANJIDIC2 kanji database

image

albertofem/kanjidic2-lib

PHP library to work with KANJIDIC2 kanji database

  • Saturday, May 9, 2015
  • by albertofem
  • Repository
  • 0 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

README

Build Status Scrutinizer Code Quality, (*1)

Requirements

PHP >= 5.3, (*2)

Installation

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

Usage

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)

License

This library is under the MIT license., (*13)

The Versions

09/05 2015

dev-master

9999999-dev

PHP library to work with KANJIDIC2 kanji database

  Sources   Download

MIT

The Requires

 

afm kanjidic kanjidic2 kanjidic-parser