as.pinyin: Convert strings of Chinese characters into Pinyin.

Description Usage Arguments Value Examples

View source: R/py_simple.R

Description

Convert strings of Chinese characters into Pinyin.

Usage

1
as.pinyin(char, sep = "_", other_replace = NULL, dic = pinyin::pinyin2)

Arguments

char

Requrired A input character string with chinese characters.

sep

character The seperator between the converted pinyin. Default: '_'

other_replace

character The replacement for non-Chinese characters

dic

The preloaded dictionary for conversion. Default: "pinyin::pinyin2"

Value

A character vector of the converted pinyin string.

Examples

1
py("hello word")

pzhaonet/pinyin documentation built on June 17, 2020, 12:35 a.m.