NAME
Lingua::JA::Romanize::Japanese - Romanization of Japanese language
SYNOPSIS
use Lingua::JA::Romanize::Japanese;
my $conv = Lingua::JA::Romanize::Japanese->new();
my $roman = $conv->char( $kanji );
printf( "%s", $kanji, $roman );
my @array = $conv->string( $string );
foreach my $pair ( @array ) {
my( $raw, $ruby ) = @$pair;
if ( defined $ruby ) {
printf( "%s", $raw, $ruby );
} else {
print $raw;
}
}
DESCRIPTION
Japanese is written with a mix of Kanji and Kana characters.
$conv = Lingua::JA::Romanize::Japanese->new();
This constructer methods returns a new object with its dictionary
cached.
$roman = $conv->char( $kanji );
This method returns romanized letters of a Japanese character. It
returns undef when $Kana is not a valid Japanese character. The
argument's encoding must be UTF-8. Both of Kanji and Kana characters are
allowed.
@array = $conv->string( $string );
This method returns a array of referenced arrays which are pairs of
Japanese chacater(s) and its romanized letters.
$array[0] # first Japanese character(s)'s pair (array)
$array[1][0] # secound Japanese character(s) itself
$array[1][1] # its romanized letters
DICTIONARY
This module's Japanese to roman mapping table is based on the dictionary
of SKK which is a Japanese input method on Emacs. It was designed by Dr.
Masahiko Sato and created in 1987. SKK is an abbreviation of 'Simple
Kana to Kanji conversion program'.
MODULE DEPENDENCIES
DB_File module is required.
SEE ALSO
Lingua::ZH::Romanize::Kana
http://www.kawa.net/works/ajax/romanize/japanese-e.html
http://openlab.jp/skk/
AUTHOR
Yusuke Kawasaki
http://www.kawa.net/
COPYRIGHT
Copyright (c) 2006 Yusuke Kawasaki. All rights reserved.
LICENSE
This dictionary is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either versions 2, or (at your option) any
later version.