Implement custom data loader
Browse files- natural_unit_conversion.py +4 -3
- test.json +2 -2
- train.json +2 -2
- val.json +2 -2
natural_unit_conversion.py
CHANGED
@@ -28,17 +28,17 @@ class CustomUnitConversionDataset(datasets.GeneratorBasedBuilder):
|
|
28 |
|
29 |
return datasets.DatasetInfo(
|
30 |
description=_DESCRIPTION,
|
31 |
-
features=datasets.Features(
|
32 |
{
|
33 |
"text": datasets.Value("string"),
|
34 |
"entities": datasets.features.Sequence(
|
35 |
{
|
36 |
"start": datasets.Value("int32"),
|
37 |
"end": datasets.Value("int32"),
|
38 |
-
"
|
39 |
}
|
40 |
)
|
41 |
-
}
|
42 |
),
|
43 |
supervised_keys=None,
|
44 |
homepage='https://huggingface.co/datasets/maliknaik/natural_unit_conversion',
|
@@ -60,3 +60,4 @@ class CustomUnitConversionDataset(datasets.GeneratorBasedBuilder):
|
|
60 |
|
61 |
for i, example in enumerate(data):
|
62 |
yield i, example
|
|
|
|
28 |
|
29 |
return datasets.DatasetInfo(
|
30 |
description=_DESCRIPTION,
|
31 |
+
features=datasets.Features(
|
32 |
{
|
33 |
"text": datasets.Value("string"),
|
34 |
"entities": datasets.features.Sequence(
|
35 |
{
|
36 |
"start": datasets.Value("int32"),
|
37 |
"end": datasets.Value("int32"),
|
38 |
+
"tag": datasets.Value("string")
|
39 |
}
|
40 |
)
|
41 |
+
}
|
42 |
),
|
43 |
supervised_keys=None,
|
44 |
homepage='https://huggingface.co/datasets/maliknaik/natural_unit_conversion',
|
|
|
60 |
|
61 |
for i, example in enumerate(data):
|
62 |
yield i, example
|
63 |
+
|
test.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7cf4ca5bd80bda9c7ade8a3390c069e9d0736b9061e34912676503e9da2eeb0f
|
3 |
+
size 31539249
|
train.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e4e9901ffca1a2532fbf9efdddc8dc5e13668346587799682e359665e41f750
|
3 |
+
size 122642897
|
val.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9520cba86380fadb491d15e52ac1795730b3be4621c079ef861f562bffb548e9
|
3 |
+
size 21028650
|