7247571ab448f9ccf6b392a26df0b8b40b1085eb,2018-asr-attention/librispeech/full-setup-attention/tools/collect-train-text.py,,,#,4

Before Change


zip_files = ["%s/%s" % (zip_dir, fn) for fn in zip_files]
assert all([os.path])

for fn in sorted(glob("train-*/*/*/*.trans.txt")):
    for l in open(fn).read().splitlines():
        seq_name, txt = l.split(" ", 1)
        print(txt)

After Change


zip_files = ["train-clean-100.zip", "train-clean-360.zip", "train-other-500.zip"]
zip_files = ["%s/%s" % (zip_dir, fn) for fn in zip_files]
assert all([os.path.exists(fn) for fn in zip_files])
zip_files = [ZipFile(fn) for fn in zip_files]

for zip_file in zip_files:
  assert zip_file.filelist
  assert zip_file.filelist[0].filename.startswith("LibriSpeech/")
  for info in zip_file.filelist:
    assert isinstance(info, ZipInfo)
    path = info.filename.split("/")
    assert path[0] == "LibriSpeech", "does not expect %r (%r)" % (info, info.filename)
    if path[1].startswith("train-"):
      subdir = path[1]  // e.g. "train-clean-100"
      if path[-1].endswith(".trans.txt"):
        for l in zip_file.read(info).decode("utf8").splitlines():
          seq_name, txt = l.split(" ", 1)
          print(txt)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: rwth-i6/returnn-experiments
Commit Name: 7247571ab448f9ccf6b392a26df0b8b40b1085eb
Time: 2018-05-16
Author: zeyer@i6.informatik.rwth-aachen.de
File Name: 2018-asr-attention/librispeech/full-setup-attention/tools/collect-train-text.py
Class Name:
Method Name:


Project Name: dhlab-epfl/dhSegment
Commit Name: d7ec164171ea9b9739b6827bf0c3d328a9c0c564
Time: 2018-04-04
Author: seg.benoit@gmail.com
File Name: demo.py
Class Name:
Method Name:


Project Name: philipperemy/keras-activations
Commit Name: 0bc9d06224686cc32e5cf52f3aae979d3380ca24
Time: 2019-01-03
Author: premy@cogent.co.jp
File Name: examples/mnist.py
Class Name:
Method Name:


Project Name: stellargraph/stellargraph
Commit Name: 7a9c823fa3422e642e779e3ed23e4dda935ee14f
Time: 2019-12-05
Author: andrew.docherty@data61.csiro.au
File Name: scripts/format_notebooks.py
Class Name:
Method Name: