Cantonese.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Pinyin.pm ↑ Summary
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( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $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( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $raw, $ruby );
18 } else {
19 print $raw;
20 }
21 }
22  
23 =head1 DESCRIPTION
24  
25 This is Cantonese version of L<Lingua::ZH::Romanize::Pinyin> 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<CTLau.tit> and C<CTLauBig5.tit>.
34 These are distributed with C<cxterm>.
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<Storable> module is required.
43  
44 =head1 UTF-8 FLAG
45  
46 This treats utf8 flag transparently.
47  
48 =head1 SEE ALSO
49  
50 L<Lingua::ZH::Romanize::Pinyin> for Standard Chinese
51  
52 L<Lingua::JA::Romanize::Japanese> for Japanese
53  
54 L<Lingua::KO::Romanize::Hangul> 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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
79 2 ▶use base qw( Lingua::ZH::Romanize::Pinyin );
Subroutine BEGIN: called CC=1 SCAR=0.0
80 2 ▶use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
81 2 $VERSION = "0.20";
82  
83 # every methods are provided by Lingua::ZH::Romanize::Pinyin!
84  
85 2 1;
« Pinyin.pm ↑ Summary