def _prep_files(box_eval):
        thelp.cat(box_eval['src_filename'], _line([10, 20, 30, 40, 17, 21]))
        thelp.cat(box_eval['trg_filename'], _line([40, 30, 20, 10, 20, 21]))
        thelp.cat(box_eval['cleaned_src_file_expected'], _line([17]))
        thelp.cat(box_eval['cleaned_trg_file_expected'], _line([20]))

        def _cleanup_files(box_eval):
            try:
                for key, filename in box_eval.items():
                    os.unlink(filename)
            except:
                pass
Example #2
0
    def _prep_files(box_eval):
        thelp.cat(box_eval['src_filename'], _line([10, 20, 30, 40, 17, 21]))
        thelp.cat(box_eval['trg_filename'], _line([40, 30, 20, 10, 20, 21]))
        thelp.cat(box_eval['cleaned_src_file_expected'], _line([17]))
        thelp.cat(box_eval['cleaned_trg_file_expected'], _line([20]))


        def _cleanup_files(box_eval):
            try:
                for key, filename in box_eval.items():
                    os.unlink(filename)
            except:
                pass
Example #3
0
 def _prep_files(box_eval):
     thelp.cat(box_eval['src_filename'], _line(range(50)))
     thelp.cat(box_eval['trg_filename'], _line(range(50)))
     #expected output:
     thelp.cat(box_eval['devel_src_expected'], _line(range(0, 13)))
     thelp.cat(box_eval['devel_trg_expected'], _line(range(0, 13)))
     thelp.cat(box_eval['eval_src_expected'], _line(range(13, 20)))
     thelp.cat(box_eval['eval_trg_expected'], _line(range(13, 20)))
     thelp.cat(box_eval['train_src_expected'], _line(range(20, 50)))
     thelp.cat(box_eval['train_trg_expected'], _line(range(20, 50)))
Example #4
0
 def _prep_files(box_eval):
     thelp.cat(box_eval['src_filename'], _line(range(50)))
     thelp.cat(box_eval['trg_filename'], _line(range(50)))
     #expected output:
     thelp.cat(box_eval['devel_src_expected'], _line(range(0,13)))
     thelp.cat(box_eval['devel_trg_expected'], _line(range(0,13)))
     thelp.cat(box_eval['eval_src_expected'], _line(range(13,20)))
     thelp.cat(box_eval['eval_trg_expected'], _line(range(13,20)))
     thelp.cat(box_eval['train_src_expected'], _line(range(20,50)))
     thelp.cat(box_eval['train_trg_expected'], _line(range(20,50)))
Example #5
0
 def _prep_files(box_eval):
   thelp.cat(box_eval['src_filename'], _line([10, 20, 30, 40, 17, 21]))
   thelp.cat(box_eval['trg_filename'], _line([40, 30, 20, 10, 20, 21]))
   #expected output:
   thelp.cat(box_eval['cleaned_src_file_expected'], _line([17]))
   thelp.cat(box_eval['cleaned_trg_file_expected'], _line([20]))