Code Monkey home page Code Monkey logo

dict.cc.py's Introduction

dict.cc.py

dict.cc.py usage

Simple unofficial command line interface for dict.cc written in Python. It supports translations between the most common languages available on the website.

Installation

dict.cc.py works with Python 2 and Python 3 and is available on PyPi. All you have to do to install it is:

pip install dict.cc.py

Usage

It's super easy! Here's a quick example of using it to translate the word beer between english (en) and swedish (sv):

$ dict.cc.py en sv beer
Showing 2 of 2 result(s)

English                                                     Swedish
========                                                    =======
beer ...................................................... öl
beer glass ................................................ ölglas

You can also search for phrases by using quotation marks:

% dict.cc.py en de body
Showing 10 of 49 result(s)

Englisch                                                    Deutsch
=========                                                   =======
body ...................................................... Körper-
a'body [Scot.] [allbody] .................................. jedermann
body [also wine] .......................................... Körper [auch bei Wein]
body ...................................................... Leib
body [dead body ] ......................................... Leiche
body ...................................................... Karosserie
body [trunk] .............................................. Rumpf
body [main part] .......................................... Hauptteil
body ...................................................... Gehäuse
body ...................................................... Körperschaft
body [society, organisation for sth.] ..................... Gesellschaft [Organisation]

Available languages include: en, de, sv, pt, it, fr, ro, nl, no.

Usage as Code

>>> from dictcc import Dict
>>> translator = Dict()
>>> result = translator.translate("hello", from_language="en", to_language="de")
>>> result.translation_tuples[:2]
[('Hello !', 'Hallo!'), ('Hello !', 'Servus! [bayer.] [österr.]')]

License

Public domain.

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.