| Home | Trees | Indices | Help |
|
|---|
|
|
API for simple access to babelfish.altavista.com.
Summary:
>>> import babelizer >>> print ' '.join(babelizer.available_languages) >>> print babelizer.translate( 'How much is that doggie in the window?', 'English', 'French' ) >>> def babel_callback(phrase): print phrase sys.stdout.flush() >>> babelizer.babelize( 'I love a reigning knight.', 'English', 'German', callback = babel_callback )
Version: $Id: babelfish.py 1361 2003-10-24 14:41:44Z edloper $
Author: Jonathan Feinberg <jdf@pobox.com>
|
|||
|
BabelizerError Calling translate() or babelize() can raise a BabelizerError |
|||
|
BabelfishChangedError Thrown when babelfish.yahoo.com changes some detail of their HTML layout, and babelizer no longer submits data in the correct form, or can no longer parse the results. |
|||
|
BabelizerIOError Thrown for various networking and IO errors. |
|||
|
|||
|
|||
|
|||
|
|||
| Helper Functions | |||
|---|---|---|---|
|
|||
|
|||
__where =
|
|||
__languages = All of the available language names. |
|||
available_languages = A list of languages available for use with babelfish. |
|||
HELP =
|
|||
x =
|
|||
|
|||
Use babelfish to translate phrase from source language to target language. It's only guaranteed to work if 'english' is one of the two languages.
|
Uses babelfish to translate back and forth between source and target until either no more changes occur in translation or limit iterations have been reached, whichever comes first. It's only guaranteed to work if 'english' is one of the two languages.
|
An interactive shell that uses babelfish to translate back and forth between source and target until either no more changes occur in translation or limit iterations have been reached, whichever comes first. It's only guaranteed to work if 'english' is one of the two languages.
|
|
|||
__where
|
__languagesAll of the available language names.
|
available_languagesA list of languages available for use with babelfish.
|
HELP
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 11 14:39:42 2011 | http://epydoc.sourceforge.net |