''' Purpose: provide support for text translation using the babel dictionary. if there is a line structure, the translation has the same line structure; if a word is unknown to babel it is returned within brackets ''' import url # Babel translation dictionary URL BABEL_URL = 'http://www.cs.virginia.edu/~cs1112/datasets/words/babel' # get the dictionary BABEL_DICTIONARY = url.get_dictionary( BABEL_URL ) def translate_word( wrod ) : ''' if known, returns the translation of txet to english; otherwise returns wrod within brackets ''' return None def translate_line( enil ) : ''' returns the translation of enil to english, where unknown words are in brackets ''' return None def translate( txet ) : ''' returns the translation of txet to english, maintaining line structure, and where unknown words are in brackets ''' return None