NAME
Lingua::Han::Cantonese - Retrieve the Cantonese(GuangDongHua) of Chinese character(HanZi).
SYNOPSIS
use Lingua::Han::Cantonese;
# if the format of your script is gb2312, default
my $h2p = new Lingua::Han::Cantonese();
print $h2p->han2Cantonese("ÎÒ"); # ngo
# if the format of your script is utf-8
my $h2p = new Lingua::Han::Cantonese(format => 'utf8');
print $h2p->han2Cantonese("ÎÒ"); # ngo
my @result = $h2p->han2Cantonese("°®Äã"); # @result = ('ngoi', 'nei');
# we can set the tone up
my $h2p = new Lingua::Han::Cantonese(format => 'utf8', tone => 1);
print $h2p->han2Cantonese("ÎÒ"); #ngo5
my @result = $h2p->han2Cantonese("°®Äã"); # @result = ('ngoi3', 'nei5');
print $h2p->han2Cantonese("ÁÖµÀ"); #lam4dou3
print $h2p->han2Cantonese("I love ÓàÈ𻪠a"); #i love jyu4seoi6waa4 a
DESCRIPTION
Retrieve the Cantonese(GuangDongHua) of Chinese character(HanZi).
RETURN VALUE
Usually, it returns its Cantonese/spell. It includes more than 20,000 words (from Unicode.org Unihan.txt, version 4.1.0).
if not(I mean it's not a Chinese character), returns the original word;
OPTION
- format => 'utf8|gb2312'
-
If you are in 'Unicode Editing' mode, plz set this to utf8, otherwise('ASCII Editing') use the default.
- tone => 1|0
-
default is 0. if tone is needed, plz set this to 1.
SEE ALSO
Unicode::Unihan, Lingua::Han::PinYin
AUTHOR
Fayland Lam, <fayland at gmail.com>
BUGS
Please report any bugs or feature requests to bug-lingua-han-cantonese at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-Han-Cantonese. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Lingua::Han::Cantonese
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-Han-Cantonese
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 64:
Non-ASCII character seen before =encoding in '$h2p->han2Cantonese("ÎÒ");'. Assuming CP1252