When you pass in a vector consisting of an English or Chinese words, this function will calls the Youdao translation open API for R to return the corresponding type of Chinese or English representation. Compare to translate function, this function can get more useful translation information.

translate_full(x)

Arguments

x

A vector made up of English or Chinese words

Value

A list made up of Chinese or English words

Examples

# Example-1 translate_full("apple")
#> [[1]] #> [[1]]$phonetic #> [1] "<U+02C8><U+00E6>pl" #> #> [[1]]$explains #> [1] "n. 苹果,苹果树,苹果似的东西;[美俚]炸弹,手榴弹,(棒球的)球;[美俚]人,家伙。" #> #> [[1]]$web #> [1] "苹果" "苹果公司" "苹果" #> #>
# Example-2 x <- c("apple", "banana", "pear", "I love you") translate_full(x)
#> [[1]] #> [[1]]$phonetic #> [1] "<U+02C8><U+00E6>pl" #> #> [[1]]$explains #> [1] "n. 苹果,苹果树,苹果似的东西;[美俚]炸弹,手榴弹,(棒球的)球;[美俚]人,家伙。" #> #> [[1]]$web #> [1] "苹果" "苹果公司" "苹果" #> #> #> [[2]] #> [[2]]$phonetic #> [1] "b<U+0259><U+02C8>n<U+00E6>n<U+0259>" #> #> [[2]]$explains #> [1] "n. 香蕉;喜剧演员;大鹰钩鼻" #> [2] "n. (Banana)(葡、津)巴纳纳(人名)" #> #> [[2]]$web #> [1] "香蕉" "香蕉甜酒" "喷鼻蕉" #> #> #> [[3]] #> [[3]]$phonetic #> [1] "per" #> #> [[3]]$explains #> [1] "n. [园艺] 梨树;梨子" "n. (Pear)人名;(英)皮尔" #> #> [[3]]$web #> [1] "梨子" "梨" "梨" #> #> #> [[4]] #> [[4]]$phonetic #> [1] "" #> #> [[4]]$explains #> [1] "我爱你。" #> #> [[4]]$web #> [1] "我爱你" "爱老虎油" "王若琳" #> #>