Package 'ecce'

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-08-26 05:33:54 UTC
Source: https://gitlab.com/chuxinyuan/ecce

Help Index


Obtain and label Chinese pinyin

Description

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.

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 calls the Youdao text translation API for R to return the corresponding type of 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 Open Youdao 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)