Esempio n. 1
0
 def _init_task(self):
     src_dict = Dictionary()
     self.symbols = "abcdefghijklmnopqrstuvwxyz"
     for symbol in self.symbols[:self.n_symbols]:
         src_dict.add_symbol(symbol)
     dst_dict = Dictionary()
     self.task = PytorchTranslateTask(None, src_dict, dst_dict)
Esempio n. 2
0
 def __init__(self):
     self.target_dictionary = Dictionary()