Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

papago-translate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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).

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 23 Dec 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc