parquet-converter
commited on
Commit
·
fb87233
1
Parent(s):
090046c
Update parquet files
Browse files
.gitattributes
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<<<<<<< HEAD
|
2 |
-
ko_wiki_v1_squad.json filter=lfs diff=lfs merge=lfs -text
|
3 |
-
=======
|
4 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
23 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
26 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
31 |
-
>>>>>>> c5265f4372eb048776b1a4f03110acb2508bab52
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common-sense-mrc.py
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import pandas as pd
|
3 |
-
import datasets
|
4 |
-
|
5 |
-
_DATA_URLS = {
|
6 |
-
"train": "./ko_wiki_v1_squad.json",
|
7 |
-
}
|
8 |
-
_VERSION = "0.0.0"
|
9 |
-
_LICENSE = ""
|
10 |
-
_CITATION = ""
|
11 |
-
_HOMEPAGE = ""
|
12 |
-
_DESCRIPTION = ""
|
13 |
-
|
14 |
-
|
15 |
-
class CommonSenseMRCConfig(datasets.BuilderConfig):
|
16 |
-
def __init__(self, data_url, features, **kwargs):
|
17 |
-
super().__init__(version=datasets.Version(_VERSION, ""), **kwargs)
|
18 |
-
self.features = features
|
19 |
-
self.data_url = data_url
|
20 |
-
|
21 |
-
|
22 |
-
class CommonSenseMRC(datasets.GeneratorBasedBuilder):
|
23 |
-
DEFAULT_CONFIG_NAME = "common_sense"
|
24 |
-
BUILDER_CONFIGS = [
|
25 |
-
CommonSenseMRCConfig(
|
26 |
-
name="common_sense",
|
27 |
-
data_url=_DATA_URLS,
|
28 |
-
features=datasets.Features(
|
29 |
-
{
|
30 |
-
"answers": datasets.Sequence(
|
31 |
-
feature={
|
32 |
-
"text": datasets.Value(dtype="string"),
|
33 |
-
"answer_start": datasets.Value(dtype="int32"),
|
34 |
-
},
|
35 |
-
),
|
36 |
-
"context": datasets.Value(dtype="string"),
|
37 |
-
"guid": datasets.Value(dtype="string"),
|
38 |
-
"question": datasets.Value(dtype="string"),
|
39 |
-
"title": datasets.Value(dtype="string"),
|
40 |
-
}
|
41 |
-
)
|
42 |
-
),
|
43 |
-
]
|
44 |
-
|
45 |
-
def _info(self):
|
46 |
-
return datasets.DatasetInfo(
|
47 |
-
features=self.config.features,
|
48 |
-
description=_DESCRIPTION,
|
49 |
-
homepage=_HOMEPAGE,
|
50 |
-
citation=_CITATION,
|
51 |
-
license=_LICENSE,
|
52 |
-
)
|
53 |
-
|
54 |
-
def _split_generators(self, dl_manager):
|
55 |
-
data_path = dl_manager.download_and_extract(self.config.data_url)
|
56 |
-
return [
|
57 |
-
datasets.SplitGenerator(
|
58 |
-
name=datasets.Split.TRAIN,
|
59 |
-
# These kwargs will be passed to _generate_examples
|
60 |
-
gen_kwargs={"data_file": data_path["train"]}
|
61 |
-
),
|
62 |
-
]
|
63 |
-
|
64 |
-
def _generate_examples(self, data_file: str):
|
65 |
-
idx = 0
|
66 |
-
common_sense_mrc = pd.read_json(data_file)
|
67 |
-
for example in common_sense_mrc["data"].tolist():
|
68 |
-
paragraphs = example["paragraphs"]
|
69 |
-
title = example["title"]
|
70 |
-
for paragraph in paragraphs:
|
71 |
-
qas = paragraph["qas"]
|
72 |
-
context = paragraph["context"]
|
73 |
-
for qa in qas:
|
74 |
-
text = [answers["text"] for answers in qa["answers"]]
|
75 |
-
answer_start = [answers["answer_start"] for answers in qa["answers"]]
|
76 |
-
features = {
|
77 |
-
"guid": str(qa["id"]),
|
78 |
-
"question": qa["question"],
|
79 |
-
"answers": {"text": text, "answer_start": answer_start},
|
80 |
-
"context": context,
|
81 |
-
"title": title,
|
82 |
-
}
|
83 |
-
yield idx, features
|
84 |
-
idx += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ko_wiki_v1_squad.json → common_sense/common-sense-mrc-train.parquet
RENAMED
@@ -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:8974ed349adac143787ac9c499befd035be85fc9f47991ce10d66e9ae9e231f1
|
3 |
+
size 54405286
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"common_sense": {"description": "", "citation": "", "homepage": "", "license": "", "features": {"answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "guid": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "common_sense_mrc", "config_name": "common_sense", "version": {"version_str": "0.0.0", "description": "", "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 116481618, "num_examples": 100268, "dataset_name": "common_sense_mrc"}}, "download_checksums": {"./ko_wiki_v1_squad.json": {"num_bytes": 93089017, "checksum": "a5a4af725210ce03a57106340f4eb248d94d23ec33030a18cc8f6c17d313f11e"}}, "download_size": 93089017, "post_processing_size": null, "dataset_size": 116481618, "size_in_bytes": 209570635}}
|
|
|
|