@theowenyoung/baidu-domain
TypeScript icon, indicating that this package has built-in type declarations

1.5.1 • Public • Published

@theowenyoung/baidu-domain

npm-version OpenTranslate

Baidu-domain translator with OpenTranslate API.

Installation

Yarn

yarn add @theowenyoung/baidu-domain

NPM

npm i @theowenyoung/baidu-domain

Usage

import BaiduDomain from '@theowenyoung/baidu-domain'

//please refer to https://api.fanyi.baidu.com/doc/22 for more details
const baiduDomain = new BaiduDomain({
    config: {
      domain: "medicine", // select from ["medicine", "electronics", "mechanics"]
      key: process.env.KEY as string,
      appid: process.env.APPID as string
    }
  });

baiduDomain.translate("肌萎缩侧索硬化症","zh-CN","en").then(console.log)

API

See translator for more details.

Disclaimer

The material and source code from this package are for study and research purposes only. Any reliance you place on such material or source code are strictly at your own risk.

/@theowenyoung/baidu-domain/

    Package Sidebar

    Install

    npm i @theowenyoung/baidu-domain

    Weekly Downloads

    1

    Version

    1.5.1

    License

    MIT

    Unpacked Size

    15.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • theowenyoung