MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / _read_words

Function _read_words

examples/PennTreebank/reader.py:25–27  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

23
24
25def _read_words(filename):
26 with tf.gfile.GFile(filename, "rb") as f:
27 return f.read().decode("utf-8").replace("\n", "<eos>").split()
28
29
30def _build_vocab(filename):

Callers 2

_build_vocabFunction · 0.85
_file_to_word_idsFunction · 0.85

Calls 1

readMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…