Skip to content

wpsteak/wordwise-translation-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

git clone https://github.com/auphone/wordwise-translation-server.git
cd wordwise-translation-server
npm install

Build

npm run build

Run

node dist/index.js

API

GET: /api/levels

Return the number of levels available in translation server

Respnose

{
  level: 3 
}

POST: /api/translate

Filter and translate difficult words by specific level

Request

{
  "level": 3,
  "words": [ "apple", "cappuccino" ],
  "lang": "zh-tw"
}

Response

{
  "cappuccino": "熱奶咖啡"
}

Options

words (Required)

  • Array of words to be filtered / translated

level

  • Level 1-3, level 1 will translate almost all words except stop words
  • Default: 1

lang

  • Any language code supported by google translate
  • Default: zh-tw

password (Optional)

  • A super simple and configurable password in config.json to restrict the use of translate API

Projects using this server

https://github.com/auphone/wordwise-chrome-extension.git

License

ISC

Author

github/auphone


Good luck!

About

A translation server with Amazon wordwise like feature

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • JavaScript 1.2%