Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Latest commit

 

History

History
58 lines (42 loc) · 881 Bytes

README.md

File metadata and controls

58 lines (42 loc) · 881 Bytes

Papago-TS

TypeScript wrapper for Papago API.

Install

npm install papago-ts

Usage

NMT Translation

import Papago from "papago-ts"

let papago = new Papago("clientID", "clientSecret")
papago.nmtTranslate("ko", "en", "안녕하세요").then(console.log)
>> Hello

Language Detection

import Papago from "papago-ts"

let papago = new Papago("clientID", "clientSecret")
papago.detectLangs("안녕하세요!").then(console.log)
>> ko

Name Romanization

import Papago from "papago-ts"

let papago = new Papago("clientID", "clientSecret")
papago.romanziation("이지은").then(console.log)
>> {
  sFirstName: '이',
  aItems: [
    { name: 'Lee Jieun', score: '99' },
    { name: 'Lee Jeeeun', score: '27' },
    { name: 'Lee Jien', score: '27' },
    { name: 'Lee Jeeen', score: '7' }
  ]
}