9fc989afc19ec56ccbf0b7b966d34bfdd254c651,parlai/tasks/cornell_movie/build.py,,build,#Any#,51

Before Change




def build(opt):
    dpath = opt["datapath"] + "/CornellMovie/"

    if not build_data.built(dpath):
        print("[building data: " + dpath + "]")
        build_data.remove_dir(dpath)
        build_data.make_dir(dpath)

        // Download the data.
        fname = "cornell_movie_dialogs_corpus.zip"
        url = "http://www.mpi-sws.org/~cristian/data/" +fname
        build_data.download(dpath, url)
        build_data.untar(dpath, fname)

        dpext = dpath + "/cornell movie-dialogs corpus/"
        create_fb_format(dpext + "movie_lines.txt",
                         dpext + "movie_conversations.txt",
                         dpath)

        // Mark the data as built.
        build_data.mark_done(dpath)

After Change




def build(opt):
    dpath = os.path.join(opt["datapath"], "CornellMovie")

    if not build_data.built(dpath):
        print("[building data: " + dpath + "]")
        build_data.remove_dir(dpath)
        build_data.make_dir(dpath)

        // Download the data.
        fname = "cornell_movie_dialogs_corpus.zip"
        url = "http://www.mpi-sws.org/~cristian/data/" + fname
        build_data.download_request(url, dpath, fname)
        build_data.untar(dpath, fname)

        dpext = os.path.join(dpath, "cornell movie-dialogs corpus")
        create_fb_format(os.path.join(dpext, "movie_lines.txt"),
                         os.path.join(dpext, "movie_conversations.txt"),
                         dpath)

        // Mark the data as built.
        build_data.mark_done(dpath)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 9fc989afc19ec56ccbf0b7b966d34bfdd254c651
Time: 2017-05-06
Author: ahm@fb.com
File Name: parlai/tasks/cornell_movie/build.py
Class Name:
Method Name: build


Project Name: facebookresearch/ParlAI
Commit Name: 9fc989afc19ec56ccbf0b7b966d34bfdd254c651
Time: 2017-05-06
Author: ahm@fb.com
File Name: parlai/tasks/qadailymail/build.py
Class Name:
Method Name: build


Project Name: facebookresearch/ParlAI
Commit Name: 9fc989afc19ec56ccbf0b7b966d34bfdd254c651
Time: 2017-05-06
Author: ahm@fb.com
File Name: parlai/tasks/mctest/build.py
Class Name:
Method Name: build