Lingua::JA::Kana(3)

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

VERSION
$Id: Kana.pm,v 0.7 2012/08/06 01:56:17 dankogai Exp $

SYNOPSIS
    use Lingua::JA::Kana;

    my $hiragana = romaji2hiragana("ohayou");
    my $katakana = romaji2katakana("ohasumi");
    my $romaji   = kana2romaji($str);

DESCRIPTION
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.

EXPORT
This module exports functions below:

  hiragana2katakana
Converts all occurance of hiragana to katakana.

  my $hiragana = hiragana2katakana($str);

hira2kata
    its alias.

  katakana2hiragana
Converts all occurance of katakana to hiragana. "kata2hira" is an alias thereof.

  my $katakana = katakana2hiragana($str);

kata2hira
    its alias.

  romaji2katakana
Converts all occurance of romaji to katakana.

  my $romaji = romaji2hiragana($str);

  romaji2hiragana
Converts all occurance of romaji to hiragana.

  my $katakana = romaji2hiragana($str);

  kana2romaji
Converts all occurance of kana (both katakana and hiragana) to romaji.

  my $romaji = kana2romaji($str);

  hankaku2zenkaku
Converts all occurance of hankaku to zenkaku.

  my $romaji = hankaku2zenkaku($str);

  zenkaku2hankaku
Converts all occurance of zenkaku to hankaku.

  my $romaji = zenkaku2hankaku($str);

INSTALLATION
To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

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

BUGS
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.

SUPPORT
You can find documentation for this module with the perldoc command.

    perldoc Lingua::JA::Kana

You can also look for information at:

•   RT: CPAN's request tracker

    <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-JA-Kana>

•   AnnoCPAN: Annotated CPAN documentation

    <http://annocpan.org/dist/Lingua-JA-Kana>

•   CPAN Ratings

    <http://cpanratings.perl.org/d/Lingua-JA-Kana>

•   Search CPAN

    <http://search.cpan.org/dist/Lingua-JA-Kana>

ACKNOWLEDGEMENTS
Lingua::JA::Romaji

COPYRIGHT & LICENSE
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.