Commit
·
7f54d80
1
Parent(s):
127f135
Update the dataset loading script (no change to the contents)
Browse files- aio-passages.py +7 -20
aio-passages.py
CHANGED
@@ -1,22 +1,9 @@
|
|
1 |
-
# Copyright 2020 The HuggingFace Datasets Authors.
|
2 |
-
# Copyright 2023 Masatoshi Suzuki (@singletongue).
|
3 |
-
#
|
4 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
# you may not use this file except in compliance with the License.
|
6 |
-
# You may obtain a copy of the License at
|
7 |
-
#
|
8 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
#
|
10 |
-
# Unless required by applicable law or agreed to in writing, software
|
11 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
# See the License for the specific language governing permissions and
|
14 |
-
# limitations under the License.
|
15 |
import io
|
16 |
from typing import Iterator, List, Tuple
|
17 |
|
18 |
import datasets
|
19 |
import pyarrow as pa
|
|
|
20 |
|
21 |
|
22 |
_DESCRIPTION = (
|
@@ -38,12 +25,12 @@ class AioPassages(datasets.ArrowBasedBuilder):
|
|
38 |
|
39 |
def _info(self) -> datasets.DatasetInfo:
|
40 |
features = datasets.Features({
|
41 |
-
"id":
|
42 |
-
"pageid":
|
43 |
-
"revid":
|
44 |
-
"text":
|
45 |
-
"section":
|
46 |
-
"title":
|
47 |
})
|
48 |
return datasets.DatasetInfo(
|
49 |
description=_DESCRIPTION,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import io
|
2 |
from typing import Iterator, List, Tuple
|
3 |
|
4 |
import datasets
|
5 |
import pyarrow as pa
|
6 |
+
from datasets import Value
|
7 |
|
8 |
|
9 |
_DESCRIPTION = (
|
|
|
25 |
|
26 |
def _info(self) -> datasets.DatasetInfo:
|
27 |
features = datasets.Features({
|
28 |
+
"id": Value("int32"),
|
29 |
+
"pageid": Value("int32"),
|
30 |
+
"revid": Value("int32"),
|
31 |
+
"text": Value("string"),
|
32 |
+
"section": Value("string"),
|
33 |
+
"title": Value("string"),
|
34 |
})
|
35 |
return datasets.DatasetInfo(
|
36 |
description=_DESCRIPTION,
|