Giter Site home page Giter Site logo

bing_translate's Introduction

Bing Translate - Simple Ruby Client for Microsoft Translator API

msdn.microsoft.com/en-us/library/ff512423.aspx

Before you can use the HTTP interface you must obtain a valid Bing API AppID. You may obtain one by visiting www.bing.com/developers/appids.aspx

Usage

from_language = 'es'
to_language = 'en'
@bt = Bing::Translator.new(from_language, to_language, {:app_id => 'YOUR_APP_ID'})
puts @bt.translate('perro')

By default, the translator caches term translations in order to avoid unnecessary requests. This can be globally disabled passing:

:cache => false

in the options hash.

You can also skip the caching only for certain translation requests by passing

:cache => false

to the translate method.

@bt.translate('A longer sentence that won't likely be repeated', { :cache => false })

License

Copyright © 2011 Christian Hein, released under the MIT license

bing_translate's People

Contributors

chrishein avatar

Stargazers

 avatar Indrajith Bandara avatar Angus H. avatar jawahar avatar Guy avatar ankh bold avatar  avatar  avatar wizcap avatar 6 avatar tokzk avatar Alexander Logvinov avatar Jonathan Chambers avatar

Watchers

Daniel Ackermann avatar  avatar James Cloos avatar

Forkers

netoctone csjaba

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.