Load translation dataset

    Parameters
    ----------
    dataset : str
    args : argparse result

    Returns
    -------

def load_translation_data(dataset, bleu, args):
    """Load translation dataset

    Parameters
    ----------
    dataset : str
    args : argparse result

    Returns
    -------

    """
    src_lang, tgt_lang = args.src_lang, args.tgt_lang
    if dataset == 'IWSLT2015':
        common_prefix = 'IWSLT2015_{}_{}_{}_{}'.format(src_lang, tgt_lang,
                                                       args.src_max_len, args.tgt_max_len)
        data_train = nlp.data.IWSLT2015('train', src_lang=src_lang, tgt_lang=tgt_lang)
        data_val = nlp.data.IWSLT2015('val', src_lang=src_lang, tgt_lang=tgt_lang)
        data_test = nlp.data.IWSLT2015('test', src_lang=src_lang, tgt_lang=tgt_lang)
    elif dataset == 'WMT2016BPE':
        common_prefix = 'WMT2016BPE_{}_{}_{}_{}'.format(src_lang, tgt_lang,
                                                        args.src_max_len, args.tgt_max_len)
        data_train = nlp.data.WMT2016BPE('train', src_lang=src_lang, tgt_lang=tgt_lang)
        data_val = nlp.data.WMT2016BPE('newstest2013', src_lang=src_lang, tgt_lang=tgt_lang)
        data_test = nlp.data.WMT2016BPE('newstest2014', src_lang=src_lang, tgt_lang=tgt_lang)
    elif dataset == 'WMT2014BPE':
        common_prefix = 'WMT2014BPE_{}_{}_{}_{}'.format(src_lang, tgt_lang,
                                                        args.src_max_len, args.tgt_max_len)
        data_train = nlp.data.WMT2014BPE('train', src_lang=src_lang, tgt_lang=tgt_lang)
        data_val = nlp.data.WMT2014BPE('newstest2013', src_lang=src_lang, tgt_lang=tgt_lang)
        data_test = nlp.data.WMT2014BPE('newstest2014', src_lang=src_lang, tgt_lang=tgt_lang,
                                        full=args.full)
    elif dataset == 'TOY':
        common_prefix = 'TOY_{}_{}_{}_{}'.format(src_lang, tgt_lang,
                                                 args.src_max_len, args.tgt_max_len)
        data_train = _dataset.TOY('train', src_lang=src_lang, tgt_lang=tgt_lang)
        data_val = _dataset.TOY('val', src_lang=src_lang, tgt_lang=tgt_lang)
        data_test = _dataset.TOY('test', src_lang=src_lang, tgt_lang=tgt_lang)
    else:
        raise NotImplementedError
    src_vocab, tgt_vocab = data_train.src_vocab, data_train.tgt_vocab
    data_train_processed = _load_cached_dataset(common_prefix + '_train')
    if not data_train_processed:
        data_train_processed = process_dataset(data_train, src_vocab, tgt_vocab,
                                               args.src_max_len, args.tgt_max_len)
        _cache_dataset(data_train_processed, common_prefix + '_train')
    data_val_processed = _load_cached_dataset(common_prefix + '_val')
    if not data_val_processed:
        data_val_processed = process_dataset(data_val, src_vocab, tgt_vocab)
        _cache_dataset(data_val_processed, common_prefix + '_val')
    if dataset == 'WMT2014BPE':
        filename = common_prefix + '_' + str(args.full) + '_test'
    else:
        filename = common_prefix + '_test'
    data_test_processed = _load_cached_dataset(filename)
    if not data_test_processed:
        data_test_processed = process_dataset(data_test, src_vocab, tgt_vocab)
        _cache_dataset(data_test_processed, filename)
    if bleu == 'tweaked':
        fetch_tgt_sentence = lambda src, tgt: tgt.split()
        val_tgt_sentences = list(data_val.transform(fetch_tgt_sentence))
        test_tgt_sentences = list(data_test.transform(fetch_tgt_sentence))
    elif bleu == '13a' or bleu == 'intl':
        fetch_tgt_sentence = lambda src, tgt: tgt
        if dataset == 'WMT2016BPE':
            val_text = nlp.data.WMT2016('newstest2013', src_lang=src_lang, tgt_lang=tgt_lang)
            test_text = nlp.data.WMT2016('newstest2014', src_lang=src_lang, tgt_lang=tgt_lang)
        elif dataset == 'WMT2014BPE':
            val_text = nlp.data.WMT2014('newstest2013', src_lang=src_lang, tgt_lang=tgt_lang)
            test_text = nlp.data.WMT2014('newstest2014', src_lang=src_lang, tgt_lang=tgt_lang,
                                         full=args.full)
        elif dataset == 'IWSLT2015' or dataset == 'TOY':
            val_text = data_val
            test_text = data_test
        else:
            raise NotImplementedError
        val_tgt_sentences = list(val_text.transform(fetch_tgt_sentence))
        test_tgt_sentences = list(test_text.transform(fetch_tgt_sentence))
    else:
        raise NotImplementedError
    return data_train_processed, data_val_processed, data_test_processed, \
           val_tgt_sentences, test_tgt_sentences, src_vocab, tgt_vocab