4cde148de0c37981c50f3a8e4a59fa4e5f653e17,examples/lstm_text_generation.py,,,#,25

Before Change


import io

path = get_file("nietzsche.txt", origin="https://s3.amazonaws.com/text-datasets/nietzsche.txt")
text = io.open(path, encoding="utf-8").read().lower()
print("corpus length:", len(text))

chars = sorted(list(set(text)))
print("total chars:", len(chars))

After Change


import io

path = get_file("nietzsche.txt", origin="https://s3.amazonaws.com/text-datasets/nietzsche.txt")
with io.open(path, encoding="utf-8") as f:
    text = f.read().lower()
print("corpus length:", len(text))

chars = sorted(list(set(text)))
print("total chars:", len(chars))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: keras-team/keras
Commit Name: 4cde148de0c37981c50f3a8e4a59fa4e5f653e17
Time: 2018-02-04
Author: bohumir.zamecnik@gmail.com
File Name: examples/lstm_text_generation.py
Class Name:
Method Name:


Project Name: NervanaSystems/nlp-architect
Commit Name: 075f154b507e7b87384ccd0956566e6af37417a0
Time: 2018-05-15
Author: 32893314+danielkorat@users.noreply.github.com
File Name: tests/test_server_sanity.py
Class Name:
Method Name: test_json_file_request


Project Name: NervanaSystems/nlp-architect
Commit Name: 075f154b507e7b87384ccd0956566e6af37417a0
Time: 2018-05-15
Author: 32893314+danielkorat@users.noreply.github.com
File Name: tests/test_server_sanity.py
Class Name:
Method Name: test_gzip_file_request