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


Lingua-JA-Kana documentation  | view source Contained in the Lingua-JA-Kana distribution.

Index


NAME

Top

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

VERSION

Top

$Id: Kana.pm,v 0.5 2011/06/10 10:23:43 dankogai Exp dankogai $

SYNOPSIS

Top

    use Lingua::JA::Kana;

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

DESCRIPTION

Top

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

Top

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

Top

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

AUTHOR

Top

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

BUGS

Top

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

Top

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

Top

Lingua::JA::Romaji

COPYRIGHT & LICENSE

Top


Lingua-JA-Kana documentation  | view source Contained in the Lingua-JA-Kana distribution.