Movatterモバイル変換


[0]ホーム

URL:


ecce

ecce offers some functions which translate English sentence intoChinese, or translate Chinese sentence into English. Learn more invignette("ecce") orhelp(package = "ecce").You can visithttps://cxy.cc/rproj/ecce/ for the latestinformation.

Installation

# Install development version via GitHubremotes::install_github("chuxinyuan/ecce")# Install from CRANinstall.packages("ecce")

Configure theID and PASSWORD for the Youdao API

To use the ecce package, user need to first register with theYoudao Wisdom Cloud AI open platform,and then open the text translation application. Then put your Youdao APIID and PASSWORD in the following code and run it once.

cat('\n# ID and PASSWORD of Youdao Translation','app_key = "Your Youdao API ID"','app_secret = "Your Youdao API PASSWORD"',file ='~/.Renviron',sep ='\n',append =TRUE)

Usage

Get started with pass a Chinese or English sentence into thetranslation function. In addition, also support obtain the pinyin of theChinese character, so that you can more easily understand thepronunciation of the Chinese character.

# Example-1translate("我喜欢中国")# Example-2translate("I like China")# Example-3translate_view("我喜欢中国")# Example-4translate_view("I like China")# Example-5pinyin("时间序列模型")

License

ecce is free and open source software, licensed under MIT + fileLICENSE.


[8]ページ先頭

©2009-2025 Movatter.jp