mirror of
https://github.com/wahyd4/go-pinyin.git
synced 2026-08-09 04:35:55 +10:00
update examples
This commit is contained in:
@@ -42,6 +42,8 @@ func main() {
|
||||
fmt.Println(pinyin.Pinyin(hans, pinyin.Args{Style: pinyin.TONE2}))
|
||||
// 开启多音字模式 [[zhong zhong] [guo] [ren]]
|
||||
fmt.Println(pinyin.Pinyin(hans, pinyin.Args{Heteronym: true}))
|
||||
// [[zho1ng zho4ng] [guo2] [re2n]]
|
||||
fmt.Println(pinyin.Pinyin(hans, pinyin.Args{Style: pinyin.TONE2, Heteronym: true}))
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -42,4 +42,9 @@ func main() {
|
||||
Style: pinyin.INITIALS},
|
||||
),
|
||||
)
|
||||
fmt.Println("Heteronym true TONE2: ",
|
||||
pinyin.Pinyin(hans, pinyin.Args{Heteronym: true,
|
||||
Style: pinyin.TONE2},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user