Giter Site home page Giter Site logo

junker / google-translate Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 7 KB

Free Google Translate API for Common Lisp

License: MIT License

Common Lisp 100.00%
common-lisp google-translate google-translate-api translation google-translate-free-api translator

google-translate's Introduction

Google-Translate

Free Google Translate API for Common Lisp

Installation

This system can be installed from UltraLisp like this:

(ql-dist:install-dist "http://dist.ultralisp.org/"
                      :prompt nil)
(ql:quickload "google-translate")

Usage

(multiple-value-bind (text data)
    (google-translate:translate "How are you?" :target "de"))
;; "Wie geht es dir?"
;;  (:TRANSLATION (("Wie geht es dir?" "How are you?" NIL NIL 10))
;;   :ALL-TRANSLATIONS (("interjection"
;;                       ("Wie geht es Ihnen?" "Wie geht es dir?" "Wie geht's Ihnen?"
;;                        "Wie geht's dir?")
;;                       (("Wie geht es Ihnen?"
;;                         ("How are you?" "How is it going?" "How are you getting along?") NIL
;;                         0.4437473)
;;                        ("Wie geht es dir?" ("How are you?") NIL 0.14633234d0)
;;                        ("Wie geht's Ihnen?" ("How are you?"))
;;                        ("Wie geht's dir?" ("How are you?")))
;;                       "How are you?" 9))
;;   :ORIGINAL-LANGUAGE "en"
;;   :POSSIBLE-TRANSLATIONS (("How are you?" NIL
;;                            (("Wie geht es dir?" 1000 T NIL (10)) ("Wie geht es Ihnen?" 1000 T NIL (1))
;;                             ("Wie gehts?" 1000 T NIL (1)) ("Wie geht es?" 1000 T NIL (1))
;;                             ("Wie gehts dir?" 1000 T NIL (1)))
;;                            ((0 12)) "How are you?" 0 0))
;;   :CONFIDENCE 1
;;   :POSSIBLE-MISTAKES NIL
;;   :LANGUAGE (("en") NIL (1) ("en"))
;;   :SYNONYMS NIL
;;   :DEFINITIONS NIL
;;   :EXAMPLES NIL
;;   :SEE-ALSO NIL)

(google-translate:translate "How are you?"
                            :target "de"
                            :source "en"
                            :dex-args '(:keep-alive nil
                                        :connect-timeout 5
                                        :verbose t))

dex-args - dexador request arguments

Disclaimer

This is an unofficial system developed for educational purposes only, using the web API of translate.google.com and also is not associated with Google.

  • The maximum character limit on a single text is 15k.
  • Due to limitations of the web version of google translate, this API does not guarantee that the library would work properly at all times (so please use this system if you don’t care about stability).
  • Important: If you want to use a stable API, I highly recommend you to use Google’s official translate API.
  • If you get HTTP 5xx error or errors like #6, it’s probably because Google has banned your client IP address.

google-translate's People

Contributors

junker avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.