++ed by:
SARTAK

1 PAUSE user

Andy Lester

NAME

Lingua::JP::Kanjidic - Parse Jim Breen's kanji dictionary

SYNOPSIS

  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();

DESCRIPTION

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.

METHODS

new

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.

reset

Resets the iterator to the beginning of file.

next

Returns the next line in the file as a Lingua::JP::Kanjidic::Kanji object (see below).

return_line($i)

Returns line $i in the file; does not affect the iterator. The line is returned as a Lingua::JP::Kanjidic::Kanji object.

lookup($kanji)

Looks up a particular kanji, returning the ::Kanji object. May be slow. The kanji should be specified as a Unicode character.

KANJI OBJECT METHODS

The following methods are available on ::Kanji objects.

kanji

The Unicode character itself.

jis

The JIS encoding, as a hex string.

unicode

The Unicode codepoint for the character, as a hex string.

nelson

The index in Nelson Modern Reader's Japanese-English Character Dictionary.

radical_nelson

The radical number, as given in Nelson.

radical

The classical radical number.

grade

The school grade in which this kanji is learnt.

strokes

The number of strokes in the kanji

halpern

The index in Halpern New Japanese-English Character Dictionary.

frequency

The frequency index of this kanji's occurrence.

new_nelson

The index number in The New Nelson Japanese-English Character Dictionary.

henshall

The index number used in "A Guide To Remembering Japanese Characters" by Kenneth G. Henshall.

gakken

The index number in the Gakken Kanji Dictionary ("A New Dictionary of Kanji Usage").

heiseg

The index number used in "Remembering The Kanji" by James Heisig.

oneill

The index number in "Japanese Names", by P.G. O'Neill.

morohashi

The index number in the 13-volume Morohashi Daikanwajiten.

tuttle

The index number in The Kanji Dictionary (Tuttle 1996).

skip

Jack Halpern's SKIP code. Note that separate copyrights apply to commercial utilization of this code.

morohashi_page

The volume and page number in the Morohashi Daikanwajiten.

four_corner

Wang Chen's four corner code.

korean / pinyin

An array reference of the Korean and Chinese readings of the kanji

meaning

An array reference of the English meanings of the kanji.

hiragana

Kun-yomi readings for the character, returned as an array reference of Unicode strings.

katakana

On-yomi readings for the character, returned as an array reference of Unicode strings.

joyo

A binary flag indicating whether or not the kanji is joyo.

SEE ALSO

http://www.csse.monash.edu.au/~jwb/kanjidic_doc.html

AUTHOR

Simon Cozens, <simon@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Simon Cozens