NAME
Lingua::Han2PinYin - convert Chinese character to its pinyin(phoneticize, spell).
SYNOPSIS
use Lingua::Han2PinYin;
my $hanzi = "ÎÒ"; # the Chinese character
my $pinyin = han2pinyin("$hanzi"); # the corresponding spell
#now $pinyin is 'wo';
DESCRIPTION
There is a Chinese document @ http://www.1313s.com/f/Han2PinYin.html
RESTRICTIONS
for the uncommon character, the distribution of its' coding is NOT continuous. So we can only convert the 10082 common character.
as far as now, we can only convert one word and one word.
RETURN VALUE
if it's a common character, it returns its pinyin/spell.
if not, it returns 'XX';
TODO
deal with sentence.
BUGS
I'm not sure it works at all OS or different versions of perl.
Follows are tested, and welcome to report any bug or correction:
Win2000(SP4) + ActivePerl 5.8.5
AUTHOR
Fayland, fayland@gmail.com
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 434:
Non-ASCII character seen before =encoding in '"ÎÒ";'. Assuming CP1252