public class PinyinHelper extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static String[] |
toGwoyeuRomatzyhStringArray(char ch)
Get all unformmatted Gwoyeu Romatzyh presentations of a single Chinese
character (both Simplified and Tranditional)
|
static String |
toHanyuPinyinString(String str,
HanyuPinyinOutputFormat outputFormat,
String seperater)
已过时。
DO NOT use it again because the first retrived pinyin string
may be a wrong pronouciation in a certain sentence context.
This interface will be removed in next release.
|
static String[] |
toHanyuPinyinStringArray(char ch)
Get all unformmatted Hanyu Pinyin presentations of a single Chinese
character (both Simplified and Tranditional)
For example,
If the input is '间', the return will be an array with two Hanyu Pinyin strings: "jian1" "jian4" If the input is '李', the return will be an array with single Hanyu Pinyin string: "li3" Special Note: If the return is "none0", that means the input Chinese character exists in Unicode CJK talbe, however, it has no pronounciation in Chinese |
static String[] |
toHanyuPinyinStringArray(char ch,
HanyuPinyinOutputFormat outputFormat)
Get all Hanyu Pinyin presentations of a single Chinese character (both
Simplified and Tranditional)
For example,
If the input is '间', the return will be an array with two Hanyu Pinyin strings: "jian1" "jian4" If the input is '李', the return will be an array with single Hanyu Pinyin string: "li3" Special Note: If the return is "none0", that means the input Chinese character is in Unicode CJK talbe, however, it has no pronounciation in Chinese |
static String[] |
toMPS2PinyinStringArray(char ch)
Get all unformmatted MPS2 (Mandarin Phonetic Symbols 2) presentations of
a single Chinese character (both Simplified and Tranditional)
|
static String[] |
toTongyongPinyinStringArray(char ch)
Get all unformmatted Tongyong Pinyin presentations of a single Chinese
character (both Simplified and Tranditional)
|
static String[] |
toWadeGilesPinyinStringArray(char ch)
Get all unformmatted Wade-Giles presentations of a single Chinese
character (both Simplified and Tranditional)
|
static String[] |
toYalePinyinStringArray(char ch)
Get all unformmatted Yale Pinyin presentations of a single Chinese
character (both Simplified and Tranditional)
|
public static String[] toHanyuPinyinStringArray(char ch)
For example,
If the input is '间', the return will be an array with
two Hanyu Pinyin strings:
"jian1"
"jian4"
If the
input is '李', the return will be an array with single Hanyu Pinyin
string:
"li3"
Special Note: If the return is "none0", that means the input Chinese character exists in Unicode CJK talbe, however, it has no pronounciation in Chinese
ch - the given Chinese characterpublic static String[] toHanyuPinyinStringArray(char ch, HanyuPinyinOutputFormat outputFormat) throws BadHanyuPinyinOutputFormatCombination
For example,
If the input is '间', the return will be an array with
two Hanyu Pinyin strings:
"jian1"
"jian4"
If the
input is '李', the return will be an array with single Hanyu Pinyin
string:
"li3"
Special Note: If the return is "none0", that means the input Chinese character is in Unicode CJK talbe, however, it has no pronounciation in Chinese
ch - the given Chinese characteroutputFormat - describes the desired format of returned Hanyu Pinyin StringBadHanyuPinyinOutputFormatCombination - if certain combination of output formats happensHanyuPinyinOutputFormat,
BadHanyuPinyinOutputFormatCombinationpublic static String[] toTongyongPinyinStringArray(char ch)
ch - the given Chinese charactertoHanyuPinyinStringArray(char)public static String[] toWadeGilesPinyinStringArray(char ch)
ch - the given Chinese charactertoHanyuPinyinStringArray(char)public static String[] toMPS2PinyinStringArray(char ch)
ch - the given Chinese charactertoHanyuPinyinStringArray(char)public static String[] toYalePinyinStringArray(char ch)
ch - the given Chinese charactertoHanyuPinyinStringArray(char)public static String[] toGwoyeuRomatzyhStringArray(char ch)
ch - the given Chinese charactertoHanyuPinyinStringArray(char)public static String toHanyuPinyinString(String str, HanyuPinyinOutputFormat outputFormat, String seperater) throws BadHanyuPinyinOutputFormatCombination
Special Note: If the return contains "none0", that means that Chinese character is in Unicode CJK talbe, however, it has not pronounciation in Chinese. This interface will be removed in next release.
str - A given string contains Chinese charactersoutputFormat - Describes the desired format of returned Hanyu Pinyin stringseperater - The string is appended after a Chinese character (excluding
the last Chinese character at the end of sentence). Note!
Seperater will not appear after a non-Chinese characterBadHanyuPinyinOutputFormatCombinationCopyright © 2013. All Rights Reserved.