net.sourceforge.pinyin4j.format
Class HanyuPinyinToneType
java.lang.Object
net.sourceforge.pinyin4j.format.HanyuPinyinToneType
public class HanyuPinyinToneType
- extends java.lang.Object
Define the output format of Hanyu Pinyin tones
Chinese has four pitched tones and a "toneless" tone. They are called Píng(平,
flat), Shǎng(上, rise), Qù(去, high drop), Rù(入, drop) and Qing(轻, toneless).
Usually, we use 1, 2, 3, 4 and 5 to represent them.
This class provides several options for output of Chinese tones, which are
listed below. For example, Chinese character '打'
Options |
Output |
WITH_TONE_NUMBER |
da3 |
WITHOUT_TONE |
da |
WITH_TONE_MARK |
dǎ |
- Author:
- Li Min (xmlerlimin@gmail.com)
Method Summary |
java.lang.String |
getName()
|
protected void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WITH_TONE_NUMBER
public static final HanyuPinyinToneType WITH_TONE_NUMBER
- The option indicates that hanyu pinyin is outputted with tone numbers
WITHOUT_TONE
public static final HanyuPinyinToneType WITHOUT_TONE
- The option indicates that hanyu pinyin is outputted without tone numbers
or tone marks
WITH_TONE_MARK
public static final HanyuPinyinToneType WITH_TONE_MARK
- The option indicates that hanyu pinyin is outputted with tone marks
name
protected java.lang.String name
HanyuPinyinToneType
protected HanyuPinyinToneType(java.lang.String name)
getName
public java.lang.String getName()
- Returns:
- Returns the name.
setName
protected void setName(java.lang.String name)
- Parameters:
name
- The name to set.