
Lingua::JA::Kana - Kata-Romaji related utilities

$Id: Kana.pm,v 0.3 2008/05/10 17:38:00 dankogai Exp dankogai $

use Lingua::JA::Kana;
my $hiragana = romaji2hiragana("ohayou");
my $katakana = romaji2katakana("ohasumi");
my $romaji = kana2romaji($str);

This module is a simple utility to convert katakana, hiragana, and romaji at ease. This module makes use of utf8 semantics which is introduced in Perl 5.8.0 and became stable enough in Perl 5.8.1 so you need Perl 5.8.1 or better.
Also note that strings in this module must be utf8-flagged. If they are not, you can use Encode to do so.
use Encode; use Lingua::JA::Kana my $romaji = kana2romaji(decode_utf8 $octet);
See Encode, perluniintro, and perlunicode for details.

This module exports functions below:
Converts all occurance of hiragana to katakana.
my $hiragana = hiragana2katakana($str);
its alias.
Converts all occurance of katakana to hiragana. kata2hira is an alias thereof.
my $katakana = katakana2hiragana($str);
its alias.
Converts all occurance of romaji to katakana.
my $romaji = romaji2hiragana($str);
Converts all occurance of romaji to hiragana.
my $katakana = romaji2hiragana($str);
Converts all occurance of kana (both katakana and hiragana) to romaji.
my $romaji = kana2romaji($str);
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install

Dan Kogai, <dankogai at dan.co.jp>

Please report any bugs or feature requests to bug-lingua-ja-kana at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-JA-Kana. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Lingua::JA::Kana
You can also look for information at:


Copyright 2007 Dan Kogai, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.