Lingua::JP::Kanjidic - Parse Jim Breen's kanji dictionary
use Lingua::JP::Kanjidic; system("wget http://ftp.monash.edu.au/pub/nihongo/kanjidic.gz"); # Please see the license at # http://www.csse.monash.edu.au/groups/edrdg/licence.html system("gunzip kanjidic.gz"); my $x = Lingua::JP::Kanjidic->new();
This module parses the kanjidic file for information about individual Japanese kanji characters. It can be used as a random-access reader or as an iterator.
Creates a new kanjidic reader; you must pass in the path to a kanjidic file, or it assumes the "kanjidic" file in the current directory.
Resets the iterator to the beginning of file.
Returns the next line in the file as a
Lingua::JP::Kanjidic::Kanji object (see below).
$i in the file; does not affect the iterator. The line is returned as a
Looks up a particular kanji, returning the
::Kanji object. May be slow. The kanji should be specified as a Unicode character.
The following methods are available on
The Unicode character itself.
The JIS encoding, as a hex string.
The Unicode codepoint for the character, as a hex string.
The index in Nelson Modern Reader's Japanese-English Character Dictionary.
The radical number, as given in Nelson.
The classical radical number.
The school grade in which this kanji is learnt.
The number of strokes in the kanji
The index in Halpern New Japanese-English Character Dictionary.
The frequency index of this kanji's occurrence.
The index number in The New Nelson Japanese-English Character Dictionary.
The index number used in "A Guide To Remembering Japanese Characters" by Kenneth G. Henshall.
The index number in the Gakken Kanji Dictionary ("A New Dictionary of Kanji Usage").
The index number used in "Remembering The Kanji" by James Heisig.
The index number in "Japanese Names", by P.G. O'Neill.
The index number in the 13-volume Morohashi Daikanwajiten.
The index number in The Kanji Dictionary (Tuttle 1996).
Jack Halpern's SKIP code. Note that separate copyrights apply to commercial utilization of this code.
The volume and page number in the Morohashi Daikanwajiten.
Wang Chen's four corner code.
An array reference of the Korean and Chinese readings of the kanji
An array reference of the English meanings of the kanji.
Kun-yomi readings for the character, returned as an array reference of Unicode strings.
On-yomi readings for the character, returned as an array reference of Unicode strings.
A binary flag indicating whether or not the kanji is joyo.
Simon Cozens, <firstname.lastname@example.org>
Copyright (C) 2004 by Simon Cozens