MCPcopy Create free account
hub / github.com/clab/dynet / __iter__

Method __iter__

examples/python-utils/util.py:40–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 def __init__(self, fname):
39 self.fname = fname
40 def __iter__(self):
41 for line in file(self.fname):
42 line = line.strip().split()
43 #line = [' ' if x == '' else x for x in line]
44 yield line
45
46class CharsCorpusReader:
47 def __init__(self, fname, begin=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected