martingrzzler commited on
Commit
c7c918e
1 Parent(s): c239e0d

Update kanjis2radicals.py

Browse files
Files changed (1) hide show
  1. kanjis2radicals.py +2 -3
kanjis2radicals.py CHANGED
@@ -39,7 +39,7 @@ class Kanji2Radicals(datasets.GeneratorBasedBuilder):
39
 
40
  def _split_generators(self, dl_manager):
41
  metadata_path = dl_manager.download(_METADATA_URL)
42
- images_path = dl_manager.download_and_extract(_IMAGES_URL)
43
  images_iter = dl_manager.iter_archive(images_path)
44
 
45
  return [
@@ -61,7 +61,7 @@ class Kanji2Radicals(datasets.GeneratorBasedBuilder):
61
  for line in f:
62
  metadata = json.loads(line)
63
  radicals.append(metadata)
64
- print("After first open and lopp")
65
  for idx, (image_path, image) in enumerate(images_iter):
66
  print(f"Processing image {idx}...")
67
  print(image_path)
@@ -74,4 +74,3 @@ class Kanji2Radicals(datasets.GeneratorBasedBuilder):
74
  "radicals": radicals[idx],
75
  "kanji_image": image.read(),
76
  }
77
-
 
39
 
40
  def _split_generators(self, dl_manager):
41
  metadata_path = dl_manager.download(_METADATA_URL)
42
+ images_path = dl_manager.download(_IMAGES_URL)
43
  images_iter = dl_manager.iter_archive(images_path)
44
 
45
  return [
 
61
  for line in f:
62
  metadata = json.loads(line)
63
  radicals.append(metadata)
64
+
65
  for idx, (image_path, image) in enumerate(images_iter):
66
  print(f"Processing image {idx}...")
67
  print(image_path)
 
74
  "radicals": radicals[idx],
75
  "kanji_image": image.read(),
76
  }