You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @glowinthedark! So, hanzi.to_pinyin()'s delimiter argument is referring to the Chinese character source string. It's used to partition the string by words rather than characters, allowing for a more accurate Pinyin reading.
delimiter is the character used to indicate word boundaries in s. This is used to differentiate between words and characters so that a more accurate reading can be returned.
Being able to format the output of the function makes sense though 👍
@tsroten: Understood. Thanks for clarifying. But then delimiter is really misleading because in other libraries delimiter or separator are used to signify the string to use as a delimiter in the generated output, and not as a hint about the format of the input string. The semantics would rather fit the description of input_delimiter or source_delimiter rather than delimiter.
How to generate then something like 'wǒ míhóutáo guòmǐn。'?
Summary
The delimiter parameter to
to_pinyin()
has no effectExample:
The default delimiter of empty string
' '
is not applied either:The text was updated successfully, but these errors were encountered: