parquet-converter
commited on
Commit
•
dd99df5
1
Parent(s):
ecf37a7
Update parquet files
Browse files- README.md +0 -10
- default/test/0000.parquet +3 -0
- default/train/0000.parquet +3 -0
- default/validation/0000.parquet +3 -0
- tota_gep_arpad.py +0 -83
- totawarpad-articles.txt +0 -0
README.md
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
---
|
2 |
-
license: gfdl
|
3 |
-
task_categories:
|
4 |
-
- text-generation
|
5 |
-
language:
|
6 |
-
- hu
|
7 |
-
pretty_name: tota_gep_arpad
|
8 |
-
size_categories:
|
9 |
-
- n<1K
|
10 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default/test/0000.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5741ab8cd527b4f348b1379211112c79631ea24474493081d97950907d56bb9
|
3 |
+
size 68143
|
default/train/0000.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d0938d9e4ca3eeba585383925839cc471c76ecc200bf3989173ffcf7eb59a4b7
|
3 |
+
size 1184209
|
default/validation/0000.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:75153feb2f91dfe29dd7ec9552c4aa19c161069e301945715e12c008c9d8d046
|
3 |
+
size 68784
|
tota_gep_arpad.py
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
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 |
-
|
16 |
-
# Lint as: python3
|
17 |
-
"""MIHVG TOTAWARPAD dataset."""
|
18 |
-
|
19 |
-
import os
|
20 |
-
import datasets
|
21 |
-
|
22 |
-
_CITATION = """\
|
23 |
-
@misc{
|
24 |
-
author={Laszlo, David},
|
25 |
-
title={totag-arpad},
|
26 |
-
year={2023},
|
27 |
-
howpublished={\\url{https://github.com/stedko/totagarpad}}
|
28 |
-
}"""
|
29 |
-
|
30 |
-
_DESCRIPTION = """\
|
31 |
-
Train dataset Tota W. Arpad cikkei a hvg-rol \
|
32 |
-
"""
|
33 |
-
|
34 |
-
class TotaGArpad(datasets.GeneratorBasedBuilder):
|
35 |
-
"""Tota Gep Arpad dataset builder."""
|
36 |
-
|
37 |
-
VERSION = datasets.Version("1.0.0")
|
38 |
-
|
39 |
-
def _info(self):
|
40 |
-
return datasets.DatasetInfo(
|
41 |
-
description=_DESCRIPTION,
|
42 |
-
features=datasets.Features({"text": datasets.Value("string")}),
|
43 |
-
supervised_keys=None,
|
44 |
-
homepage="https://github.com/stedko/totagarpad/blob/main/totawarpad-articles.txt",
|
45 |
-
citation=_CITATION,
|
46 |
-
)
|
47 |
-
|
48 |
-
def _split_generators(self, dl_manager):
|
49 |
-
download_path = dl_manager.download_and_extract(
|
50 |
-
"https://raw.githubusercontent.com/stedko/totagarpad/main/totawarpad-articles.txt"
|
51 |
-
)
|
52 |
-
if os.path.isdir(download_path):
|
53 |
-
txt_path = os.path.join(download_path, "input.txt")
|
54 |
-
else:
|
55 |
-
txt_path = download_path
|
56 |
-
with open(txt_path, "r", encoding="utf-8") as f:
|
57 |
-
text = f.read()
|
58 |
-
|
59 |
-
i = int(len(text) * 0.9)
|
60 |
-
train_text, text = text[:i], text[i:]
|
61 |
-
i = int(len(text) * 0.5)
|
62 |
-
validation_text, text = text[:i], text[i:]
|
63 |
-
test_text = text
|
64 |
-
|
65 |
-
return [
|
66 |
-
datasets.SplitGenerator(
|
67 |
-
name=datasets.Split.TRAIN,
|
68 |
-
gen_kwargs={"split_key": "train", "split_text": train_text},
|
69 |
-
),
|
70 |
-
datasets.SplitGenerator(
|
71 |
-
name=datasets.Split.VALIDATION,
|
72 |
-
gen_kwargs={"split_key": "validation", "split_text": validation_text},
|
73 |
-
),
|
74 |
-
datasets.SplitGenerator(
|
75 |
-
name=datasets.Split.TEST,
|
76 |
-
gen_kwargs={"split_key": "test", "split_text": test_text},
|
77 |
-
),
|
78 |
-
]
|
79 |
-
|
80 |
-
def _generate_examples(self, split_key, split_text):
|
81 |
-
data_key = split_key
|
82 |
-
feature_dict = {"text": split_text}
|
83 |
-
yield data_key, feature_dict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
totawarpad-articles.txt
DELETED
The diff for this file is too large to render.
See raw diff
|
|