| Type: | Package |
| Title: | Translate English Sentence into Chinese, or Translate ChineseSentence into English |
| Version: | 3.0.3 |
| Maintainer: | Xinyuan Chu <chuxinyuan@outlook.com> |
| Date: | 2025-04-11 17:41:01 UTC |
| 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. |
| License: | MIT + file LICENSE |
| URL: | https://cxy.cc/rproj/ecce/,https://github.com/chuxinyuan/ecce |
| BugReports: | https://github.com/chuxinyuan/ecce/issues |
| Depends: | R (≥ 3.5.0) |
| Imports: | curl, uuid, digest, httr, jsonlite |
| RoxygenNote: | 7.3.2 |
| Suggests: | testthat (≥ 2.1.0), knitr, rmarkdown |
| VignetteBuilder: | knitr |
| Encoding: | UTF-8 |
| NeedsCompilation: | no |
| Packaged: | 2025-04-11 18:12:19 UTC; chuxinyuan |
| Author: | Xinyuan Chu [aut, cre] |
| Repository: | CRAN |
| Date/Publication: | 2025-04-11 19:20:02 UTC |
Obtain and label Chinese pinyin
Description
When you pass in a Chinese character, you can obtain the pinyin of theChinese character, so that you can more easily understand the pronunciationof the Chinese character.
Usage
pinyin(input)Arguments
input | A string consisting of Chinese character or sentences. |
Value
A string consisting of pinyin and input Chinese character.
Examples
## Not run: pinyin("type Chinese character")## End(Not run)Translate English sentence into Chinese, or translate Chinese sentence into English
Description
When you pass in an English or Chinese sentence, this function will callsthe Youdao text translation API for R to return the corresponding typeof Chinese or English representation.
Usage
translate(input, from = "auto", to = "auto")Arguments
input | An English or Chinese sentence. |
from | The source language, an optional parameter. |
to | The target language, an optional parameter. |
Value
The translation results about target language.
Examples
## Not run: translate("I like China") translate("quarto", from = "en", to = "zh-CHS")## End(Not run)Open a Youdao website browse translation results
Description
When you pass in an English or Chinese sentence, this function will OpenYoudao website browse translation results.
Usage
translate_view(input, from = "auto", to = "auto")Arguments
input | An English or Chinese sentence. |
from | The source language, an optional parameter. |
to | The target language, an optional parameter. |
Value
Just open a website and do not return any results.
Examples
## Not run: translate_view("I like China") translate_view("quarto", from = "en", to = "zh-CHS")## End(Not run)