Socket
Socket
Sign inDemoInstall

tureng

Package Overview
Dependencies
7
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tureng

API and commandline application for tureng translater


Version published
Weekly downloads
40
increased by566.67%
Maintainers
1
Install size
158 kB
Created
Weekly downloads
 

Readme

Source

tureng Build Status

An unofficial tureng.com translater module and commandline application. It uses official API that used in mobile application. It supports English-Turkish and English-German.

Install

npm install -g tureng

ffmpeg required for voice on Linux

  • sudo apt install ffmpeg for Ubuntu (Tested on 17.04)

Usage CLI

  • tureng <entr/ende> <word> for single translation.
  • tureng <entr/ende> for CLI.

In CLI, inputs except some special commands are always translating.

  • .exit exit
  • .lang <entr/ende> change language
  • .<number of suggestion that you want translate> select suggestion fastly with writing
  • .voice <us/uk/au> play voice of word [Windows (Tested) and Linux (?)]
  • .clear clear screen

CLI Screenshot

Example Code 1

var Tureng = require("tureng");

let kelime = new Tureng("katze", "ende"); // Tureng(word, lang); lang=ende for german, entr for english
kelime.getSuggestions((list) => {list.forEach((element) => {console.log(element)})});

/* Output:
katzenartig
katzenhaft
*/

Example Code 2

var Tureng = require("tureng");

let kelime = new Tureng("album", "ende");
kelime.Translate((list) => {console.log(list)});

/* Output:
{ Situation: { IsFound: true, Suggestion: false },
  Language: 'Both',
  Translations:
   { En2De: [ [Object], [Object], [Object], [Object], [Object] ],
     De2En: [ [Object], [Object], [Object] ] } }
*/

/*
Language: German, English, Both ---> String
Translations: En2De, De2En, En2De and De2En ---> Object
En2De/De2En={TermDE, TermENG} ---> Object
Suggestions: ['Suggestion1', 'Suggestion2', ...] ---> Array
*/

On Windows, commandline MP3 player that we used is cmdmp3 by James K. Lawless

Copyright © 2017 Gökberk AKDENİZ

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 21 Jul 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc