bd97dee4fc635d8aa8707c4fbac39e569e9f148d,tensorlayer/files.py,,load_nietzsche_dataset,#,497

Before Change


        print("Downloading %s" % filename)
        urlretrieve(source + filename, filename)

    if not os.path.exists("nietzsche.txt"):
        download("nietzsche.txt")

    // return nlp.read_words("nietzsche.txt", replace = ["", ""])
    // with tf.gfile.GFile("nietzsche.txt", "r") as f:
    //     return f.read()
    with open("nietzsche.txt", "r") as f:
        words = f.read()
        return words

After Change


    >>> words = basic_clean_str(words)
    >>> words = words.split()
    
    print("Load or Download nietzsche dataset > {}".format(path))

    filename = "nietzsche.txt"
    url = "https://s3.amazonaws.com/text-datasets/"
    filepath = maybe_download_and_extract(filename, path, url)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: zsdonghao/text-to-image
Commit Name: bd97dee4fc635d8aa8707c4fbac39e569e9f148d
Time: 2017-01-18
Author: i.mochaz@gmail.com
File Name: tensorlayer/files.py
Class Name:
Method Name: load_nietzsche_dataset


Project Name: kubeflow/kubeflow
Commit Name: 99c94d88c96c2b0a45bbbef4c8a126fa018ce513
Time: 2018-10-11
Author: 37601826+kunmingg@users.noreply.github.com
File Name: bootstrap/build.py
Class Name:
Method Name: main


Project Name: maxpumperla/elephas
Commit Name: 3244cbc512a6b617600a91ec60b65e3e01d2b1dc
Time: 2018-09-05
Author: max.pumperla@googlemail.com
File Name: elephas/java/__init__.py
Class Name:
Method Name: