Giter VIP home page Giter VIP logo

nodepapago's Introduction

nodepapago - 비공식 파파고 라이브러리.

TypeScript Passed License

  • Note: It can stop working anytime.
  • 전달: 이 프로그램은 언제라도 작동을 멈출 수 있습니다.
  • English

NPM

설치

npm install nodepapago

Github

https://github.com/PinMIlk/nodepapago

npm

https://www.npmjs.com/package/nodepapago

예시

import Translator from 'nodepapago';

new Translator({
    parameter: {
        target: 'ko',
        text: 'So far, so good!'
    }
}).translate()
    .then(res => console.log(res))
    .catch(e => console.log(e));
// Expected output: '지금까지, 너무 좋아요!'

new Translator({
    parameter: [
        {
            source: 'en',
            target: 'ko',
            text: 'Morning, sir.'
        },
        {
            source: 'en',
            target: 'ko',
            text: 'Morning, ma\'am.'
        }
    ],
    honorific: true
}).translate()
    .then(res => console.log(res))
    .catch(e => console.log(e));
// Expected output: [ '안녕하세요, 선생님.', '안녕하세요, 부인.' ]

new Translator({
    parameter: [
        {
            source: 'en',
            target: 'ko',
            text: 'Morning!'
        },
        {
            source: 'en',
            target: 'ko',
            text: 'Morning, baby!'
        }
    ],
    verbose: true
}).translate()
    .then(res => console.log(res))
    .catch(e => console.log(e));
// Expected output: sooooo long...

Translator.detect('So far, so bueno!')
    .then(res => console.log(res))
    .catch(e => console.log(e));
// Expected output: 'it'

설정

설명 타입 필수 기본값
parameter 매개변수 (리스트) TranslateParameter | TranslateParameter[] Y -
honorfic 높임말 boolean N false
verbose 결과를 json으로 내보낼 지 결정합니다. boolean N false
multi 다중 번역 boolean N false

매개변수

프로퍼티 설명 타입 필수 기본값
source 원본 텍스트 언어 코드 string N detect
target 번역할 텍스트 언어 코드 string Y -
text 번역할 문장 string Y -

언어 감지

매개변수 설명 타입 필수
text 언어를 감지할 문장 string Y

언어 코드

코드 언어
ko 한국어
en 영어
ja 일본어
zh-cn 중국어(간체)
zh-tw 중국어(번체)
hi 힌디어
es 에스파냐어
fr 프랑스어
de 독일어
pt 포르투갈어
vi 베트남어
id 인도네시아어
fa 페르시아어
ar 아랍어
mm 미얀마어
th 태국어
ru 러시아어
it 이탈리아어
detect 자동 감지

변경점

v2.2.1

  • 해싱 알고리즘 변경

v2.2.4

  • 해싱 알고리즘 변경

v3.0.0

  • 전체 소스 변경

v3.0.1

  • 해싱 알고리즘 변경

v3.1.0

  • 해싱 알고리즘 변경
  • 모듈화

v3.1.1

  • UUID 생성 부분 변경(기존 Papago 방식 → UUID Module 사용)
  • 약간의 경량화
  • README.md File 기본 언어를 한국어로 변경

라이선스

nodepapago는 MIT 라이선스를 따릅니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.