NAME
eGuideDog::Dict::Cantonese - an informal Jyutping dictionary.
SYNOPSIS
use utf8;
use eGuideDog::Dict::Cantonese;
binmode(stdout, 'utf8');
my $dict = eGuideDog::Dict::Cantonese->new();
my @symbols = $dict->get_multi_phon("长");
print "长(all pronunciation): @symbols\n"; # cong2 zoeng2 coeng4 - cong2 should be a mistake in dictionary. This kind of mistake is common and the dictionary is far from perfect.
my $symbol = $dict->get_jyutping("长");
print "长(default pronunciation): $symbol\n"; # 长: coeng4
$symbol = $dict->get_jyutping("长辈");
print "长辈的长: $symbol\n"; # zoeng2
@symbols = $dict->get_jyutping("粤拼");
print "粤拼: @symbols\n"; # 粤拼: jyut6 ping3
my @words = $dict->get_words("长");
print "Some words begin with 长: @words\n";
DESCRIPTION
This module is for looking up Jyutping of Cantonese characters or words. It's edited by a programmer not a linguistician. There are many mistakes. So don't take it serious. It's a part of the eGuideDog project (http://e-guidedog.sf.net).
EXPORT
None by default.
METHODS
new()
Initialize dictionary.
get_jyutping($str)
Return an array of jyutping phonetic symbols of all characters in $str if it is in an array context.
Return a string of jyutping phonetic symbol of the first character if it is not in array context. If it's a multi-phonetic-symbol character, the default symbol will be output.
get_words($char)
Return an array of words which are begined with $char. This list of words contains multi-phonetic-symbol characters and the symbol used in the word is not the default one.
is_multi_phon($char)
Return non-zero if $char is multi-phonetic-symbol character. The returned value plus 1 is the number of phonetic symbols the character has.
Return 0 if $char is single-phonetic-symbol character.
get_multi_phon($char)
Return an array of phonetic symbols of $char.
SEE ALSO
eGuideDog::Dict::Mandarin, http://e-guidedog.sf.net
AUTHOR
Cameron Wong, <hgn823-perl at yahoo.com.cn>
COPYRIGHT AND LICENSE
- of the Module
-
Copyright 2008 by Cameron Wong
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
- Some of the dictionary data is from Unihan
-
Copyright (c) 1996-2006 Unicode, Inc. All Rights reserved.
Name: Unihan database Unicode version: 5.0.0 Table version: 1.1 Date: 7 July 2006