MCPcopy Create free account
hub / github.com/pytorch/tutorials / readLines

Function readLines

intermediate_source/char_rnn_generation_tutorial.py:104–106  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

102
103# Read a file and split into lines
104def readLines(filename):
105 with open(filename, encoding='utf-8') as some_file:
106 return [unicodeToAscii(line.strip()) for line in some_file]
107
108# Build the category_lines dictionary, a list of lines per category
109category_lines = {}

Callers 1

Calls 1

unicodeToAsciiFunction · 0.70

Tested by

no test coverage detected