<s> """<STR_LIT>""" <EOL> import codecs <EOL> from os . path import abspath , dirname , join <EOL> import random <EOL> DICTIONARIES_PATH = abspath ( join ( dirname ( __file__ ) , '<STR_LIT>' ) ) <EOL> dictionaries_cache = { } <EOL> def get_dictionary ( dict_name ) : <EOL> """<STR_LIT>""" <EOL> global dictionaries_cache <EOL> if dict_name not in dictionaries_cache : <EOL> try : <EOL> dictionary_file = codecs . open ( <EOL> join ( DICTIONARIES_PATH , dict_name ) , '<STR_LIT:r>' , '<STR_LIT:utf-8>' <EOL> ) <EOL> except IOError : <EOL> None <EOL> else : <EOL> dictionaries_cache [ dict_name ] = dictionary_file . readlines ( ) <EOL> dictionary_file . close ( ) <EOL> return dictionaries_cache [ dict_name ] </s>
