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

SYNOPSIS
        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;
            }
        }

DESCRIPTION
    Pinyin is a phonemic notation of Chinese characters.

        $conv = Lingua::ZH::Romanize::Pinyin->new();

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

        $roman = $conv->char( $hanji );

    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.

        @array = $conv->string( $string );

    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

DICTIONARY
    This module's Hanji to roman mapping table is based on PY.tit file which
    was distributed with cxterm.

MODULE DEPENDENCIES
    Storable module is required.

SEE ALSO
    Lingua::ZH::Romanize::Cantonese

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

AUTHOR
    Yusuke Kawasaki <u-suke [at] kawa.net>

    http://www.kawa.net/

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

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

