Title: | Translate English Sentence into Chinese, or Translate Chinese Sentence into English |
---|---|
Description: | If translate English or Chinese sentence, there is a faster way for R user. You can pass in an English or Chinese sentence, ecce package support both English and Chinese translation. It also support browse translation results in website. In addition, also support obtain the pinyin of the Chinese character, you can more easily understand the pronunciation of the Chinese character. |
Authors: | Xinyuan Chu [aut, cre] |
Maintainer: | Xinyuan Chu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 3.0.2 |
Built: | 2024-10-25 04:47:23 UTC |
Source: | https://gitlab.com/chuxinyuan/ecce |
When you pass in a Chinese character, you can obtain the pinyin of the Chinese character, so that you can more easily understand the pronunciation of the Chinese character.
pinyin(input)
pinyin(input)
input |
A string consisting of Chinese character or sentences. |
A string consisting of pinyin and input Chinese character.
## Not run: pinyin("type Chinese character") ## End(Not run)
## Not run: pinyin("type Chinese character") ## End(Not run)
When you pass in an English or Chinese sentence, this function will calls the Youdao text translation API for R to return the corresponding type of Chinese or English representation.
translate(input, from = "auto", to = "auto")
translate(input, from = "auto", to = "auto")
input |
An English or Chinese sentence. |
from |
The source language, an optional parameter. |
to |
The target language, an optional parameter. |
The translation results about target language.
## Not run: translate("I like China") translate("quarto", from = "en", to = "zh-CHS") ## End(Not run)
## Not run: translate("I like China") translate("quarto", from = "en", to = "zh-CHS") ## End(Not run)
When you pass in an English or Chinese sentence, this function will Open Youdao website browse translation results.
translate_view(input, from = "auto", to = "auto")
translate_view(input, from = "auto", to = "auto")
input |
An English or Chinese sentence. |
from |
The source language, an optional parameter. |
to |
The target language, an optional parameter. |
Just open a website and do not return any results.
## Not run: translate_view("I like China") translate_view("quarto", from = "en", to = "zh-CHS") ## End(Not run)
## Not run: translate_view("I like China") translate_view("quarto", from = "en", to = "zh-CHS") ## End(Not run)