java 取得汉字拼音
来源:互联网 发布:java jsoup多线程爬虫 编辑:程序博客网 时间:2024/05/16 23:52
开源项目:pinyin4j http://pinyin4j.sourceforge.net/
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
/**
* @author **
*/
public class PinyinTest {
public static void main(String[] args) throws BadHanyuPinyinOutputFormatCombination {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
format.setVCharType(HanyuPinyinVCharType.WITH_V);
format.setCaseType(HanyuPinyinCaseType.UPPERCASE);
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
String[] ss = PinyinHelper.toHanyuPinyinStringArray('吕', format);
for (String s : ss) {
System.out.println(s);
}
}
}
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
/**
* @author **
*/
public class PinyinTest {
public static void main(String[] args) throws BadHanyuPinyinOutputFormatCombination {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
format.setVCharType(HanyuPinyinVCharType.WITH_V);
format.setCaseType(HanyuPinyinCaseType.UPPERCASE);
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
String[] ss = PinyinHelper.toHanyuPinyinStringArray('吕', format);
for (String s : ss) {
System.out.println(s);
}
}
}
- java 取得汉字拼音
- 使用Java取得汉字的拼音首字母
- 使用Java取得汉字的拼音首字母
- 取得汉字拼音首字母
- 取得汉字拼音
- delphi取得汉字拼音
- 使用Java取得汉字的拼音首字母(转)
- 使用Java取得汉字的拼音首字母(转)
- 取得汉字的拼音首字母
- 怎样取得汉字的拼音
- Excel 取得汉字拼音首字母
- asp输入汉字取得汉字的拼音
- 取得汉字拼音首字母函数,取得汉字串首字母
- c#取得汉字的拼音的首字母。
- C#取得汉字的拼音的首字母。
- c#取得汉字的拼音的首字母
- C#取得汉字的拼音的首字母
- c#取得汉字的拼音的首字母
- 哎
- IT外企那点儿事(1):外企也就那么回事
- CPoint,CSize,CRect类说明
- 判断必须舒服的是数字
- 持续
- java 取得汉字拼音
- java获取路径
- 关于算法的时间复杂度
- Java图片缩小后不失真代码
- MFC CFont Sample
- JSP标签起步
- 程序退出的几种方法
- linux 2.6.32 在arm9(s3c2440)平台的移植2 -- Kconfig和Makefile
- radio控制层的和隐藏