martingrzzler
commited on
Commit
•
eb22643
1
Parent(s):
19d3527
Update kanjis2radicals.py
Browse files- kanjis2radicals.py +3 -3
kanjis2radicals.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import datasets
|
2 |
-
import os
|
3 |
import json
|
4 |
|
5 |
_DESCRIPTION = """\
|
@@ -19,7 +18,7 @@ class Kanji2Radicals(datasets.GeneratorBasedBuilder):
|
|
19 |
features=datasets.Features(
|
20 |
{
|
21 |
"kanji_image": datasets.Image(),
|
22 |
-
"
|
23 |
"id": datasets.Value("int32"),
|
24 |
"characters": datasets.Value("string"),
|
25 |
"meanings": datasets.Value("string"),
|
@@ -61,6 +60,7 @@ class Kanji2Radicals(datasets.GeneratorBasedBuilder):
|
|
61 |
|
62 |
for idx, (image_path, image) in enumerate(images_iter):
|
63 |
yield image_path, {
|
64 |
-
"
|
65 |
"kanji_image": image.read(),
|
66 |
}
|
|
|
|
1 |
import datasets
|
|
|
2 |
import json
|
3 |
|
4 |
_DESCRIPTION = """\
|
|
|
18 |
features=datasets.Features(
|
19 |
{
|
20 |
"kanji_image": datasets.Image(),
|
21 |
+
"meta": {
|
22 |
"id": datasets.Value("int32"),
|
23 |
"characters": datasets.Value("string"),
|
24 |
"meanings": datasets.Value("string"),
|
|
|
60 |
|
61 |
for idx, (image_path, image) in enumerate(images_iter):
|
62 |
yield image_path, {
|
63 |
+
"meta": radicals[idx],
|
64 |
"kanji_image": image.read(),
|
65 |
}
|
66 |
+
|