Coder Social home page Coder Social logo

yadic's Introduction

Yadic

Yadic is a command-line tool for online translation powered by Yandex.Dictionary.

July 15, 2015 Yadic's 0.1 version was written in two days as my exercise in learning Haskell. I know that true Haskell hackers would hate the way I wrote it (imperative, dirty etc) so I hope to eventually improve it a lot. Meanwhile I would highly appreciate having advice from experienced Haskell programmers.

Usage

$ ./yadic de-en kamille
camomile (noun)
$ ./yadic en-ru camomile
ромашка (существительное)
ромашковый (прилагательное)
$ ./yadic ru-tr ромашка
papatya (isim)
$ ./yadic tr-de papatya
Kamille (noun)

Installation

Only OS X was tested so far. ghc compiler is needed.

Clone it, build it yourself:

git clone https://github.com/stanislaw/Yadic
cd Yadic
make # Results in 'yadic' binary in dist/build/yadic

Place yadic binary somewhere to /usr/local/bin.

Configuration

  1. API Key is needed. Yandex.Dictionary API methods are accessed using a key so you need to obtain one: Dictionary API.

  2. Create ~/.yadic file with the following contents:

lang: en-en # Default pair of languages to translate (from-to)
apikey: dict.1.1.20150711T192659Z... # your Yandex Dictionary API key

Credits

Yadic is entirely based on Yandex.Dictionary API free service so most of the credit goes to their wonderful machinery. That is great that they made it available for free.

TODO

  • Learn Haskell to remove imperative non-idiomatic code

  • Modularize Yadic, write better functions

  • Add option to make output very verbose to support all the functionality Yandex.Dictionary offers. But first Haskell: multiple declarations of x is somehow to be resolved.

  • Add support for Yandex.Translation so that yadic word would go to Dictionary and yadic "phrase" would to to Translate.

License

MIT + Terms of Use of API Yandex.Dictionary Service. See LICENSE for details.

Copyright

Copyright (c) 2015, Stanislaw Pankevich. See LICENSE for details.

yadic's People

Contributors

stanislaw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

iakhtyamov

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.