8eee23c8f98660a64fcc65de02c26e01493b8708,torchtext/experimental/datasets/raw/translation.py,,_setup_datasets,#,117

Before Change


            extracted_files.extend(extract_archive(dataset_tar))
    elif isinstance(URLS[dataset_name], str):
        dataset_tar = download_from_url(URLS[dataset_name], root=root, hash_value=MD5[dataset_name], hash_type="md5")
        extracted_files.extend(extract_archive(dataset_tar))
    else:
        raise ValueError(
            "URLS for {} has to be in a form or list or string".format(
                dataset_name))

After Change


            // We need to take an extra step to pick out the specific language pair from it.
            src_language = train_filenames[0].split(".")[-1]
            tgt_language = train_filenames[1].split(".")[-1]
            languages = "-".join([src_language, tgt_language])
            iwslt_tar = ".data/2016-01/texts/{}/{}/{}.tgz"
            iwslt_tar = iwslt_tar.format(
                src_language, tgt_language, languages)
            extracted_dataset_tar = extract_archive(iwslt_tar)
        extracted_files.extend(extracted_dataset_tar)
    else:
        raise ValueError(
            "URLS for {} has to be in a form or list or string".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: pytorch/text
Commit Name: 8eee23c8f98660a64fcc65de02c26e01493b8708
Time: 2020-12-29
Author: glai9665@gmail.com
File Name: torchtext/experimental/datasets/raw/translation.py
Class Name:
Method Name: _setup_datasets


Project Name: explosion/thinc
Commit Name: d6d7cb7db51776b026514a1a2caa4073b9e998ad
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: pad


Project Name: explosion/thinc
Commit Name: fd23fa8466b2cef601ea4d49c8933cc2ee364eb5
Time: 2019-12-26
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/function_layer.py
Class Name: ConcatenationLayer
Method Name: __init__


Project Name: THUNLP-MT/THUMT
Commit Name: 410992318552115d2e3de84844bf523012e3e98e
Time: 2019-11-26
Author: cg847519328@163.com
File Name: thumt/utils/hooks.py
Class Name:
Method Name: _evaluate


Project Name: soft-matter/trackpy
Commit Name: 204245164d400936ca602d867ae23aca311b74cb
Time: 2014-11-10
Author: daniel.b.allan@gmail.com
File Name: doc/conf.py
Class Name:
Method Name: