def __init__(self): Process.__init__(self) self.samplers = {} for l in conf.LANGUAGES: my_args = parse_args() my_args = conf.get_config(l, my_args) print(my_args) self.samplers[l] = ChatSampler(my_args) self.tokenizer_cmd = [ os.getcwd() + '/tokenizer.perl', '-l', 'en', '-q', '-' ] self.detokenizer_cmd = [ os.getcwd() + '/detokenizer.perl', '-l', 'fr', '-q', '-' ]
def __init__(self): Process.__init__(self) my_args = parse_args() my_args.changes = "indx_word = './model/ivocab.in.pkl', \ indx_word_target = './model/ivocab.out.pkl', \ word_indx = './model/vocab.in.pkl', \ word_indx_trgt = './model/vocab.out.pkl'" self.sampler = ChatSampler(my_args) self.RESPONSE_MAX_COST = 1.5 self.NUM_SAMPLES = 10 self.tokenizer_cmd = [ os.getcwd() + '/tokenizer.perl', '-l', 'en', '-q', '-' ] self.detokenizer_cmd = [ os.getcwd() + '/detokenizer.perl', '-l', 'fr', '-q', '-' ]