Datasets:
Tasks:
Text Classification
Sub-tasks:
semantic-similarity-classification
Languages:
Korean
Size:
1K<n<10K
License:
Commit ·
8f9f570
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +142 -0
- dataset_infos.json +1 -0
- dummy/1.1.0/dummy_data.zip +3 -0
- kor_qpair.py +103 -0
.gitattributes
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- expert-generated
|
| 4 |
+
language_creators:
|
| 5 |
+
- other
|
| 6 |
+
languages:
|
| 7 |
+
- ko
|
| 8 |
+
licenses:
|
| 9 |
+
- mit
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
- 1K<n<10K
|
| 14 |
+
source_datasets:
|
| 15 |
+
- original
|
| 16 |
+
task_categories:
|
| 17 |
+
- text-classification
|
| 18 |
+
task_ids:
|
| 19 |
+
- semantic-similarity-classification
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Dataset Card for [Dataset Name]
|
| 23 |
+
|
| 24 |
+
## Table of Contents
|
| 25 |
+
|
| 26 |
+
- [Dataset Description](#dataset-description)
|
| 27 |
+
- [Dataset Summary](#dataset-summary)
|
| 28 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
| 29 |
+
- [Languages](#languages)
|
| 30 |
+
- [Dataset Structure](#dataset-structure)
|
| 31 |
+
- [Data Instances](#data-instances)
|
| 32 |
+
- [Data Fields](#data-instances)
|
| 33 |
+
- [Data Splits](#data-instances)
|
| 34 |
+
- [Dataset Creation](#dataset-creation)
|
| 35 |
+
- [Curation Rationale](#curation-rationale)
|
| 36 |
+
- [Source Data](#source-data)
|
| 37 |
+
- [Annotations](#annotations)
|
| 38 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
| 39 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
| 40 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
| 41 |
+
- [Discussion of Biases](#discussion-of-biases)
|
| 42 |
+
- [Other Known Limitations](#other-known-limitations)
|
| 43 |
+
- [Additional Information](#additional-information)
|
| 44 |
+
- [Dataset Curators](#dataset-curators)
|
| 45 |
+
- [Licensing Information](#licensing-information)
|
| 46 |
+
- [Citation Information](#citation-information)
|
| 47 |
+
|
| 48 |
+
## Dataset Description
|
| 49 |
+
|
| 50 |
+
- **Homepage:** [Github](https://github.com/songys/Question_pair)
|
| 51 |
+
- **Repository:** [Github](https://github.com/songys/Question_pair)
|
| 52 |
+
- **Paper:**
|
| 53 |
+
- **Leaderboard:**
|
| 54 |
+
- **Point of Contact:**
|
| 55 |
+
|
| 56 |
+
### Dataset Summary
|
| 57 |
+
|
| 58 |
+
[More Information Needed]
|
| 59 |
+
|
| 60 |
+
### Supported Tasks and Leaderboards
|
| 61 |
+
|
| 62 |
+
[More Information Needed]
|
| 63 |
+
|
| 64 |
+
### Languages
|
| 65 |
+
|
| 66 |
+
[More Information Needed]
|
| 67 |
+
|
| 68 |
+
## Dataset Structure
|
| 69 |
+
|
| 70 |
+
### Data Instances
|
| 71 |
+
|
| 72 |
+
[More Information Needed]
|
| 73 |
+
|
| 74 |
+
### Data Fields
|
| 75 |
+
|
| 76 |
+
Each row in the dataset contains two questions and a `is_duplicate` label.
|
| 77 |
+
|
| 78 |
+
- `question1`: The first question
|
| 79 |
+
- `question2`: The second question
|
| 80 |
+
- `is_duplicate`: 0 if `question1` and `question2` are semantically similar; 1 otherwise
|
| 81 |
+
|
| 82 |
+
### Data Splits
|
| 83 |
+
|
| 84 |
+
[More Information Needed]
|
| 85 |
+
|
| 86 |
+
## Dataset Creation
|
| 87 |
+
|
| 88 |
+
### Curation Rationale
|
| 89 |
+
|
| 90 |
+
[More Information Needed]
|
| 91 |
+
|
| 92 |
+
### Source Data
|
| 93 |
+
|
| 94 |
+
#### Initial Data Collection and Normalization
|
| 95 |
+
|
| 96 |
+
[More Information Needed]
|
| 97 |
+
|
| 98 |
+
#### Who are the source language producers?
|
| 99 |
+
|
| 100 |
+
[More Information Needed]
|
| 101 |
+
|
| 102 |
+
### Annotations
|
| 103 |
+
|
| 104 |
+
#### Annotation process
|
| 105 |
+
|
| 106 |
+
[More Information Needed]
|
| 107 |
+
|
| 108 |
+
#### Who are the annotators?
|
| 109 |
+
|
| 110 |
+
[More Information Needed]
|
| 111 |
+
|
| 112 |
+
### Personal and Sensitive Information
|
| 113 |
+
|
| 114 |
+
[More Information Needed]
|
| 115 |
+
|
| 116 |
+
## Considerations for Using the Data
|
| 117 |
+
|
| 118 |
+
### Social Impact of Dataset
|
| 119 |
+
|
| 120 |
+
[More Information Needed]
|
| 121 |
+
|
| 122 |
+
### Discussion of Biases
|
| 123 |
+
|
| 124 |
+
[More Information Needed]
|
| 125 |
+
|
| 126 |
+
### Other Known Limitations
|
| 127 |
+
|
| 128 |
+
[More Information Needed]
|
| 129 |
+
|
| 130 |
+
## Additional Information
|
| 131 |
+
|
| 132 |
+
### Dataset Curators
|
| 133 |
+
|
| 134 |
+
[More Information Needed]
|
| 135 |
+
|
| 136 |
+
### Licensing Information
|
| 137 |
+
|
| 138 |
+
[More Information Needed]
|
| 139 |
+
|
| 140 |
+
### Citation Information
|
| 141 |
+
|
| 142 |
+
[More Information Needed]
|
dataset_infos.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"default": {"description": "This is a Korean paired question dateset containing labels that denote whether two questions in a given pair are semantically identical.\n", "citation": "@misc{Song:2018,\n title = \"Paired Question v.2\",\n authors = \"Youngsook Song\",\n publisher = \"GitHub\",\n year = \"2018\"\n}\n", "homepage": "https://github.com/songys/Question_pair", "license": "The MIT License (MIT)", "features": {"question1": {"dtype": "string", "id": null, "_type": "Value"}, "question2": {"dtype": "string", "id": null, "_type": "Value"}, "is_duplicate": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "kor_qpair", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 515365, "num_examples": 6136, "dataset_name": "kor_qpair"}, "test": {"name": "test", "num_bytes": 63466, "num_examples": 758, "dataset_name": "kor_qpair"}, "validation": {"name": "validation", "num_bytes": 57242, "num_examples": 682, "dataset_name": "kor_qpair"}}, "download_checksums": {"https://raw.githubusercontent.com/songys/Question_pair/master/train.txt": {"num_bytes": 441758, "checksum": "addf4c88b19066ad55a09f466c5c3f6428b3f2bd5d55100d3ca5b93d9d8daff9"}, "https://raw.githubusercontent.com/songys/Question_pair/master/test.txt": {"num_bytes": 54395, "checksum": "0d5738107ea3742de4dcaf3a358b6bfa4818781bc6aec11a9956a3fbe35f8b61"}, "https://raw.githubusercontent.com/songys/Question_pair/master/validation.txt": {"num_bytes": 49083, "checksum": "3928c783f561f36547fd8e0c9d78a6e1d6013db3debcf559c4135aa5536badea"}}, "download_size": 545236, "post_processing_size": null, "dataset_size": 636073, "size_in_bytes": 1181309}}
|
dummy/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:326445d40a99645f820cbf475afcadc08623a823caf8f2aac121125d3005b053
|
| 3 |
+
size 1131
|
kor_qpair.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
| 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 |
+
"""Korean pairwise question binary classification dataset"""
|
| 16 |
+
|
| 17 |
+
from __future__ import absolute_import, division, print_function
|
| 18 |
+
|
| 19 |
+
import datasets
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
_CITATION = """\
|
| 23 |
+
@misc{Song:2018,
|
| 24 |
+
title = "Paired Question v.2",
|
| 25 |
+
authors = "Youngsook Song",
|
| 26 |
+
publisher = "GitHub",
|
| 27 |
+
year = "2018"
|
| 28 |
+
}
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
_DESCRIPTION = """\
|
| 33 |
+
This is a Korean paired question dataset containing labels indicating whether two questions in a given pair are semantically identical. This dataset was used to evaluate the performance of [KoGPT2](https://github.com/SKT-AI/KoGPT2#subtask-evaluations) on a phrase detection downstream task.
|
| 34 |
+
"""
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
_HOMEPAGE = "https://github.com/songys/Question_pair"
|
| 38 |
+
|
| 39 |
+
_LICENSE = "The MIT License (MIT)"
|
| 40 |
+
|
| 41 |
+
_URL = "https://raw.githubusercontent.com/songys/Question_pair/master/"
|
| 42 |
+
_URLs = {key: f"{_URL}{key}.txt" for key in ("train", "test", "validation")}
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
class KorQpair(datasets.GeneratorBasedBuilder):
|
| 46 |
+
"""Korean pairwise question classification dataset"""
|
| 47 |
+
|
| 48 |
+
VERSION = datasets.Version("1.1.0")
|
| 49 |
+
|
| 50 |
+
def _info(self):
|
| 51 |
+
|
| 52 |
+
return datasets.DatasetInfo(
|
| 53 |
+
description=_DESCRIPTION,
|
| 54 |
+
features=datasets.Features(
|
| 55 |
+
{
|
| 56 |
+
"question1": datasets.Value("string"),
|
| 57 |
+
"question2": datasets.Value("string"),
|
| 58 |
+
"is_duplicate": datasets.ClassLabel(names=["0", "1"]),
|
| 59 |
+
}
|
| 60 |
+
),
|
| 61 |
+
supervised_keys=None,
|
| 62 |
+
homepage=_HOMEPAGE,
|
| 63 |
+
license=_LICENSE,
|
| 64 |
+
citation=_CITATION,
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
def _split_generators(self, dl_manager):
|
| 68 |
+
|
| 69 |
+
downloaded_files = dl_manager.download_and_extract(_URLs)
|
| 70 |
+
return [
|
| 71 |
+
datasets.SplitGenerator(
|
| 72 |
+
name=datasets.Split.TRAIN,
|
| 73 |
+
gen_kwargs={
|
| 74 |
+
"filepath": downloaded_files["train"],
|
| 75 |
+
"split": "train",
|
| 76 |
+
},
|
| 77 |
+
),
|
| 78 |
+
datasets.SplitGenerator(
|
| 79 |
+
name=datasets.Split.TEST,
|
| 80 |
+
gen_kwargs={
|
| 81 |
+
"filepath": downloaded_files["test"],
|
| 82 |
+
"split": "test",
|
| 83 |
+
},
|
| 84 |
+
),
|
| 85 |
+
datasets.SplitGenerator(
|
| 86 |
+
name=datasets.Split.VALIDATION,
|
| 87 |
+
gen_kwargs={
|
| 88 |
+
"filepath": downloaded_files["validation"],
|
| 89 |
+
"split": "validation",
|
| 90 |
+
},
|
| 91 |
+
),
|
| 92 |
+
]
|
| 93 |
+
|
| 94 |
+
def _generate_examples(self, filepath, split):
|
| 95 |
+
with open(filepath, encoding="utf-8") as f:
|
| 96 |
+
next(f)
|
| 97 |
+
for id_, row in enumerate(f):
|
| 98 |
+
row = row.strip().split("\t")
|
| 99 |
+
yield id_, {
|
| 100 |
+
"question1": row[0],
|
| 101 |
+
"question2": row[1],
|
| 102 |
+
"is_duplicate": row[2],
|
| 103 |
+
}
|