parquet-converter
commited on
Commit
·
4310daa
1
Parent(s):
383f1d1
Update parquet files
Browse files- .gitattributes +1 -0
- README.md +0 -3
- data/label.txt +0 -7
- data/test.tsv +0 -0
- data/train.tsv +0 -0
- data/valid.tsv +0 -0
- default/klue-tc-dev-tsv-test.parquet +0 -0
- default/klue-tc-dev-tsv-train.parquet +3 -0
- default/klue-tc-dev-tsv-validation.parquet +0 -0
- klue-tc-dev-tsv.py +0 -55
.gitattributes
CHANGED
@@ -14,3 +14,4 @@
|
|
14 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
|
|
|
14 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
17 |
+
default/klue-tc-dev-tsv-train.parquet filter=lfs diff=lfs merge=lfs -text
|
README.md
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
This is a in-house development version of KLUE Topic Classification benchmark, as the test split is not released by the KLUE team.
|
2 |
-
|
3 |
-
We randomly split the original validation set (9,107 instances) into in-house validation set (5,107 instances) and the in-house test set (4,000 instances).
|
|
|
|
|
|
|
|
data/label.txt
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
정치
|
2 |
-
세계
|
3 |
-
IT과학
|
4 |
-
스포츠
|
5 |
-
사회
|
6 |
-
경제
|
7 |
-
생활문화
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/test.tsv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/train.tsv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/valid.tsv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
default/klue-tc-dev-tsv-test.parquet
ADDED
Binary file (229 kB). View file
|
|
default/klue-tc-dev-tsv-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc16d56c2232ad2086c3e0fd0fac334a7f3aca2e36349abf631ffd05c085071d
|
3 |
+
size 2566827
|
default/klue-tc-dev-tsv-validation.parquet
ADDED
Binary file (292 kB). View file
|
|
klue-tc-dev-tsv.py
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
from __future__ import absolute_import, division, print_function
|
2 |
-
import datasets
|
3 |
-
_URL = "data/"
|
4 |
-
_URLs = {
|
5 |
-
"train": _URL + "train.tsv",
|
6 |
-
"valid": _URL + "valid.tsv",
|
7 |
-
"test": _URL + "test.tsv",
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
class KlueTC(datasets.GeneratorBasedBuilder):
|
12 |
-
|
13 |
-
def _info(self):
|
14 |
-
return datasets.DatasetInfo(
|
15 |
-
description="KLUE Topic Classification (Dev Split)",
|
16 |
-
features=datasets.Features(
|
17 |
-
{
|
18 |
-
"text": datasets.Value("string"),
|
19 |
-
"label": datasets.features.ClassLabel(names=['정치', '세계', 'IT과학', '스포츠', '사회', '경제', '생활문화']),
|
20 |
-
}
|
21 |
-
),
|
22 |
-
supervised_keys=None,
|
23 |
-
license="",
|
24 |
-
homepage="",
|
25 |
-
citation="",
|
26 |
-
)
|
27 |
-
|
28 |
-
def _split_generators(self, dl_manager):
|
29 |
-
downloaded_files = dl_manager.download_and_extract(_URLs)
|
30 |
-
return [
|
31 |
-
datasets.SplitGenerator(
|
32 |
-
name=datasets.Split.TRAIN,
|
33 |
-
gen_kwargs={
|
34 |
-
"filepath": downloaded_files["train"],
|
35 |
-
}
|
36 |
-
),
|
37 |
-
datasets.SplitGenerator(
|
38 |
-
name=datasets.Split.VALIDATION,
|
39 |
-
gen_kwargs={
|
40 |
-
"filepath": downloaded_files["valid"],
|
41 |
-
}
|
42 |
-
),
|
43 |
-
datasets.SplitGenerator(
|
44 |
-
name=datasets.Split.TEST,
|
45 |
-
gen_kwargs={
|
46 |
-
"filepath": downloaded_files["test"],
|
47 |
-
}
|
48 |
-
),
|
49 |
-
]
|
50 |
-
|
51 |
-
def _generate_examples(self, filepath):
|
52 |
-
with open(filepath, "r", encoding='UTF-8') as f:
|
53 |
-
for idx, line in enumerate(f):
|
54 |
-
text, label = line.split("\t")
|
55 |
-
yield idx, {"text": text.strip(), "label": label.strip()}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|