Socket
Socket
Sign inDemoInstall

papago-translate

Package Overview
Dependencies
9
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    papago-translate

A Node.js NPM package for using Naver Papago easily (papago.naver.com).


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

About

Papago-translate is an efficient easy-to-use translator using Naver Papago.

  • Quick to learn
  • Highly maintained and Great support
  • Detailed documentation

Installation

Node.js 16.11.x or higher is recommended.
(Made on Node.js v18.10.0)

npm i discord.js

Example Usage

Importing library

const { Papago } = require("papago-translate");
const client = new Papago();

Example: Translate from Korean to English:

client.translate({
    from: "ko",
    to: "en",
    text: "빈민가에 사는 쓸모없는 골칫덩이, 그라티아."
}).then((response) => {
    console.log(response.result.translation);
}).catch(console.error);
// -> Gratia, a useless nuisance living in a slum.

Example: Detect Language of the text:

client.detectLanguage("빈민가에 사는 쓸모없는 골칫덩이, 그라티아.")
.then(console.log).catch(console.error);
// -> { error: false, result: "ko", valid: true }

Example: Get information about single word or multiple words.

client.define({
    from: "ko",
    to: "en",
    text: "줄거리"
}).then(console.log).catch(console.error);
// -> { error: false, result: { is_word: true, examples: [...], items: [ {...} ] } };

client.define({
    from: "en",
    to: "ko",
    text: "Organic Plot"
}).then(console.log).catch(console.error);
// -> { error: false, result: { is_word: false, examples: [], items: [ {...}, {...} ] } }

Documentation

You can find documentation here!

For any issue or contribution, please check the GitHub repository here!

Keywords

FAQs

Last updated on 23 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc