Three types of output format options can be customized in pinyin4j.
- VCharType: output format of character 'ü', which has three options.
- WITH_U_AND_COLON (default)
- WITH_V
- WITH_U_UNICODE
- ToneType: output format of Chinese tones, which has three options.
- WITH_TONE_NUMBER (default)
- WITHOUT_TONE
- WITH_TONE_MARK
- CaseType: cases of letters in outputted string, which has two options.
- LOWERCASE (default)
- UPPERCASE
Some combinations of these three output formats are forbidden. For example, '吕'
LOWERCASE | |||
---|---|---|---|
Combination | WITH_U_AND_COLON | WITH_V | WITH_U_UNICODE |
WITH_TONE_NUMBER | lu:3 | lv3 | lü3 |
WITHOUT_TONE | lu: | lv | lü |
WITH_TONE_MARK | Exception | Exception | lǚ |
UPPERCASE | |||
---|---|---|---|
Combination | WITH_U_AND_COLON | WITH_V | WITH_U_UNICODE |
WITH_TONE_NUMBER | LU:3 | LV3 | LÜ3 |
WITHOUT_TONE | LU: | LV | LÜ |
WITH_TONE_MARK | Exception | Exception | LǙ |
Tone | Tone Mark | Number added to end of syllable in place of tone mark |
Example using tone mark |
Example using number |
---|---|---|---|---|
First | macron (¯) | 1 | mā | ma1 |
Second | acute accent (´) | 2 | má | ma2 |
Third | caron (ˇ) | 3 | mǎ | ma3 |
Fourth | grave accent (`) | 4 | mà | ma4 |