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::ZH::Romanize::Pinyin(3) User Contributed Perl Documentation Lingua::ZH::Romanize::Pinyin(3)

Lingua::ZH::Romanize::Pinyin - Romanization of Standard Chinese language

    use Lingua::ZH::Romanize::Pinyin;

    my $conv = Lingua::ZH::Romanize::Pinyin->new();
    my $roman = $conv->char( $hanji );
    printf( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $hanji, $roman );

    my @array = $conv->string( $string );
    foreach my $pair ( @array ) {
        my( $raw, $ruby ) = @$pair;
        if ( defined $ruby ) {
            printf( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $raw, $ruby );
        } else {
            print $raw;
        }
    }

Pinyin is a phonemic notation for Chinese characters.

This constructer methods returns a new object with its dictionary cached.

This method returns romanized letters of a Hanji character. It returns undef when $hanji is not a valid Hanji character. The argument's encoding must be UTF-8. Both of Simplified Chinese and Traditional Chinese are allowed.

This method returns romanized letters of Hanji characters.

This method returns a array of referenced arrays which are pairs of a Hanji chacater and its romanized letters.

    $array[0]           # first Chinese character's pair (array)
    $array[1][0]        # secound Chinese character itself
    $array[1][1]        # its romanized letters

This module internally uses a mapping table from Hanji to roman which is based on "PY.tit" which is distributed with "cxterm".

Storable module is required.

This treats utf8 flag transparently.

Lingua::ZH::Romanize::Cantonese for romanization of Cantonese

Lingua::JA::Romanize::Japanese for romanization of Japanese

Lingua::KO::Romanize::Hangul for romanization of Korean

http://www.kawa.net/works/perl/romanize/romanize-e.html

http://linuga-romanize.googlecode.com/svn/trunk/Lingua-ZH-Romanize-Pinyin/

Copyright (c) 2003-2008 Yusuke Kawasaki. All rights reserved.

Any commercial use of the Software requires a license directly from the author(s). Please contact the author(s) to negotiate an appropriate license. Commercial use includes integration of all or part of the binary or source code covered by this permission notices into a product for sale or license to third parties on your behalf, or distribution of the binary or source code to third parties that need it to utilize a product sold or licensed on your behalf.
2008-01-20 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.