Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkweon/papago
Naver Papago GO Wrapper API
https://github.com/kkweon/papago
Last synced: 24 days ago
JSON representation
Naver Papago GO Wrapper API
- Host: GitHub
- URL: https://github.com/kkweon/papago
- Owner: kkweon
- License: mit
- Created: 2018-12-03T07:43:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-07T19:17:49.000Z (about 6 years ago)
- Last Synced: 2023-04-04T04:32:19.514Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PapaGo
[![Build Status](https://travis-ci.com/kkweon/papago.svg?branch=master)](https://travis-ci.com/kkweon/papago)
[![GoDoc](https://godoc.org/github.com/kkweon/papago/pkg/papago?status.svg)](https://godoc.org/github.com/kkweon/papago/pkg/papago)Naver Papago GO API Wrapper
```go
import "github.com/kkweon/papago/pkg/papago"payload := papago.Payload{
Source: papago.En,
Target: papago.Ko,
Text: "Hello World",
}
resp, _ := papago.TranslateNMT(auth, payload)
fmt.Println(resp)
// Output: 안녕 세계
```## Get Started
1. Set Environment Variables or use `papago.NaverAuth{clientID, clientSecret}`
```bash
export NAVER_CLIENT_ID = "..."
export NAVER_CLIENT_SECRET = "..."
```2. Retrieve `papago.NaverAuth`
```go
auth, err := papago.GetAuthFromEnv()
```3. 2 Functions to use
```go
papago.TranslateNMT(auth, payload) (string, error)
papago.TranslateSMT(auth, payload) (string, error)
```