GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Lingua::JA::Kana(3) User Contributed Perl Documentation Lingua::JA::Kana(3)

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

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

    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);
hira2kata
its alias.

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

  my $katakana = katakana2hiragana($str);
kata2hira
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);

Converts all occurance of hankaku to zenkaku.

  my $romaji = hankaku2zenkaku($str);

Converts all occurance of zenkaku to hankaku.

  my $romaji = zenkaku2hankaku($str);

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:

  • 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>

Lingua::JA::Romaji

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.

2012-08-06 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.