#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# all_chars = ( ( ( [ chr ( ( ord ( 'a' ) + i ) ) for i in range ( 26 ) ] + [ chr ( ( ord ( '0' ) + i ) ) for i in range ( 10 ) ] ) + [ ',' , '.' , '!' , '?' , '<UNK>' ] ) + [ ' ' , '<S>' , '</S>' ] ) #NEWLINE# code2char = dict ( enumerate ( all_chars ) ) #NEWLINE# self . char2code = { v : code2char for ( k , v ) in code2char . items ( ) }