line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Lingua::ZH::Romanize::Cantonese - Romanization of Cantonese language |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Lingua::ZH::Romanize::Cantonese; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $conv = Lingua::ZH::Romanize::Cantonese->new(); |
10
|
|
|
|
|
|
|
my $roman = $conv->char( $hanji ); |
11
|
|
|
|
|
|
|
printf( "%s", $hanji, $roman ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my @array = $conv->string( $string ); |
14
|
|
|
|
|
|
|
foreach my $pair ( @array ) { |
15
|
|
|
|
|
|
|
my( $raw, $ruby ) = @$pair; |
16
|
|
|
|
|
|
|
if ( defined $ruby ) { |
17
|
|
|
|
|
|
|
printf( "%s", $raw, $ruby ); |
18
|
|
|
|
|
|
|
} else { |
19
|
|
|
|
|
|
|
print $raw; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This is Cantonese version of L module. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Cantonese is one of the major dialects of Chinese language. |
28
|
|
|
|
|
|
|
Its pronounciation is different from Mandarin Standard's. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DICTIONARY |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This module internally uses a mapping table from Hanji to roman |
33
|
|
|
|
|
|
|
which is based on both of C and C. |
34
|
|
|
|
|
|
|
These are distributed with C. |
35
|
|
|
|
|
|
|
Original files were prepared by Fung Fung Lee. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Sidney Lau's Cantonese transcription scheme as described in his book |
38
|
|
|
|
|
|
|
"Elementary Cantonese", The Government Printer, Hong Kong, 1972. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 MODULE DEPENDENCY |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
L module is required. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 UTF-8 FLAG |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This treats utf8 flag transparently. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
L for Standard Chinese |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L for Japanese |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L for Korean |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
http://www.kawa.net/works/perl/romanize/romanize-e.html |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
http://linuga-romanize.googlecode.com/svn/trunk/Lingua-ZH-Romanize-Pinyin/ |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Copyright (c) 2003-2008 Yusuke Kawasaki. All rights reserved. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Any commercial use of the Software requires a license directly from |
67
|
|
|
|
|
|
|
the author(s). Please contact the author(s) to negotiate an |
68
|
|
|
|
|
|
|
appropriate license. Commercial use includes integration of all or |
69
|
|
|
|
|
|
|
part of the binary or source code covered by this permission |
70
|
|
|
|
|
|
|
notices into a product for sale or license to third parties on your |
71
|
|
|
|
|
|
|
behalf, or distribution of the binary or source code to third |
72
|
|
|
|
|
|
|
parties that need it to utilize a product sold or licensed on your |
73
|
|
|
|
|
|
|
behalf. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
package Lingua::ZH::Romanize::Cantonese; |
78
|
2
|
|
|
2
|
|
2807
|
use strict; |
|
2
|
|
|
|
|
32
|
|
|
2
|
|
|
|
|
98
|
|
79
|
2
|
|
|
2
|
|
12
|
use base qw( Lingua::ZH::Romanize::Pinyin ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1294
|
|
80
|
2
|
|
|
2
|
|
16
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
262
|
|
81
|
|
|
|
|
|
|
$VERSION = "0.20"; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# every methods are provided by Lingua::ZH::Romanize::Pinyin! |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |