Commit
•
ad43ff0
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 +148 -0
- dataset_infos.json +1 -0
- dummy/wikitext-tl-39/1.0.0/dummy_data.zip +3 -0
- wikitext_tl39.py +113 -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,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- no-annotation
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- fil
|
8 |
+
- tl
|
9 |
+
licenses:
|
10 |
+
- gpl-3-0
|
11 |
+
multilinguality:
|
12 |
+
- monolingual
|
13 |
+
size_categories:
|
14 |
+
- n>1M
|
15 |
+
source_datasets:
|
16 |
+
- original
|
17 |
+
task_categories:
|
18 |
+
- sequence-modeling
|
19 |
+
task_ids:
|
20 |
+
- language-modeling
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for WikiText-TL-39
|
24 |
+
|
25 |
+
## Table of Contents
|
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:** [Filipino Text Benchmarks](https://github.com/jcblaisecruz02/Filipino-Text-Benchmarks)
|
51 |
+
- **Repository: **
|
52 |
+
- **Paper:** [Evaluating language model finetuning techniques for low-resource languages](https://arxiv.org/abs/1907.00409)
|
53 |
+
- **Leaderboard:**
|
54 |
+
- **Point of Contact:** Jan Christian Blaise Cruz ([email protected])
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
Large scale, unlabeled text dataset with 39 Million tokens in the training set. Inspired by the original WikiText Long Term Dependency dataset (Merity et al., 2016). TL means "Tagalog." Published in Cruz & Cheng (2019).
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
[More Information Needed]
|
63 |
+
|
64 |
+
### Languages
|
65 |
+
|
66 |
+
Filipino/Tagalog
|
67 |
+
|
68 |
+
## Dataset Structure
|
69 |
+
|
70 |
+
### Data Instances
|
71 |
+
|
72 |
+
[More Information Needed]
|
73 |
+
|
74 |
+
### Data Fields
|
75 |
+
|
76 |
+
- `text` (`str`)
|
77 |
+
|
78 |
+
The dataset is in plaintext and only has one field ("text") as it is compiled for language modeling.
|
79 |
+
|
80 |
+
### Data Splits
|
81 |
+
|
82 |
+
Split | Documents | Tokens
|
83 |
+
------|-----------|-------
|
84 |
+
Train | 120,975 | 39M
|
85 |
+
Valid | 25,919 | 8M
|
86 |
+
Test | 25,921 | 8M
|
87 |
+
|
88 |
+
Please see the paper for more details on the dataset splits
|
89 |
+
|
90 |
+
## Dataset Creation
|
91 |
+
|
92 |
+
### Curation Rationale
|
93 |
+
|
94 |
+
[More Information Needed]
|
95 |
+
|
96 |
+
### Source Data
|
97 |
+
|
98 |
+
Tagalog Wikipedia
|
99 |
+
|
100 |
+
#### Initial Data Collection and Normalization
|
101 |
+
|
102 |
+
[More Information Needed]
|
103 |
+
|
104 |
+
#### Who are the source language producers?
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
### Annotations
|
109 |
+
|
110 |
+
#### Annotation process
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Who are the annotators?
|
115 |
+
|
116 |
+
[More Information Needed]
|
117 |
+
|
118 |
+
### Personal and Sensitive Information
|
119 |
+
|
120 |
+
[More Information Needed]
|
121 |
+
|
122 |
+
## Considerations for Using the Data
|
123 |
+
|
124 |
+
### Social Impact of Dataset
|
125 |
+
|
126 |
+
[More Information Needed]
|
127 |
+
|
128 |
+
### Discussion of Biases
|
129 |
+
|
130 |
+
[More Information Needed]
|
131 |
+
|
132 |
+
### Other Known Limitations
|
133 |
+
|
134 |
+
[More Information Needed]
|
135 |
+
|
136 |
+
## Additional Information
|
137 |
+
|
138 |
+
### Dataset Curators
|
139 |
+
|
140 |
+
[More Information Needed]
|
141 |
+
|
142 |
+
### Licensing Information
|
143 |
+
|
144 |
+
[More Information Needed]
|
145 |
+
|
146 |
+
### Citation Information
|
147 |
+
|
148 |
+
[More Information Needed]
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"wikitext-tl-39": {"description": "Large scale, unlabeled text dataset with 39 Million tokens in the training set. Inspired by the original WikiText Long Term Dependency dataset (Merity et al., 2016). TL means \"Tagalog.\" Originally published in Cruz & Cheng (2019).\n", "citation": "@article{cruz2019evaluating,\n title={Evaluating Language Model Finetuning Techniques for Low-resource Languages},\n author={Cruz, Jan Christian Blaise and Cheng, Charibeth},\n journal={arXiv preprint arXiv:1907.00409},\n year={2019}\n}\n", "homepage": "https://github.com/jcblaisecruz02/Filipino-Text-Benchmarks", "license": "GPL-3.0", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "wikitext_tl39", "config_name": "wikitext-tl-39", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 46182996, "num_examples": 376737, "dataset_name": "wikitext_tl39"}, "train": {"name": "train", "num_bytes": 217182748, "num_examples": 1766072, "dataset_name": "wikitext_tl39"}, "validation": {"name": "validation", "num_bytes": 46256674, "num_examples": 381763, "dataset_name": "wikitext_tl39"}}, "download_checksums": {"https://s3.us-east-2.amazonaws.com/blaisecruz.com/datasets/wikitext-tl-39/wikitext-tl-39.zip": {"num_bytes": 116335234, "checksum": "261ad06d7afc09058dfbf1d878ff5e2902b34e0145a34285af3f88badd4056b6"}}, "download_size": 116335234, "post_processing_size": null, "dataset_size": 309622418, "size_in_bytes": 425957652}}
|
dummy/wikitext-tl-39/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f147fda40570e48f882d6e10c4302ec21c0e6bfe13cb3d788a55ef6deb2a93ab
|
3 |
+
size 1817
|
wikitext_tl39.py
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""TODO(wikitext): Add a description here."""
|
2 |
+
|
3 |
+
from __future__ import absolute_import, division, print_function
|
4 |
+
|
5 |
+
import os
|
6 |
+
|
7 |
+
import datasets
|
8 |
+
|
9 |
+
|
10 |
+
# TODO(wikitext): BibTeX citation
|
11 |
+
_CITATION = """\
|
12 |
+
@article{cruz2019evaluating,
|
13 |
+
title={Evaluating Language Model Finetuning Techniques for Low-resource Languages},
|
14 |
+
author={Cruz, Jan Christian Blaise and Cheng, Charibeth},
|
15 |
+
journal={arXiv preprint arXiv:1907.00409},
|
16 |
+
year={2019}
|
17 |
+
}
|
18 |
+
"""
|
19 |
+
|
20 |
+
# TODO(wikitext):
|
21 |
+
_DESCRIPTION = """\
|
22 |
+
Large scale, unlabeled text dataset with 39 Million tokens in the training set. Inspired by the original WikiText Long Term Dependency dataset (Merity et al., 2016). TL means "Tagalog." Originally published in Cruz & Cheng (2019).
|
23 |
+
"""
|
24 |
+
_URL = "https://github.com/jcblaisecruz02/Filipino-Text-Benchmarks"
|
25 |
+
_LICENSE = "GPL-3.0"
|
26 |
+
_DATA_URL = "https://s3.us-east-2.amazonaws.com/blaisecruz.com/datasets/wikitext-tl-39"
|
27 |
+
|
28 |
+
|
29 |
+
class WikitextTl39Config(datasets.BuilderConfig):
|
30 |
+
"""BuilderConfig for WikiText."""
|
31 |
+
|
32 |
+
def __init__(self, data_url, **kwargs):
|
33 |
+
"""BuilderConfig for Wikitext
|
34 |
+
|
35 |
+
Args:
|
36 |
+
data_url: `string`, url to the dataset (word or raw level)
|
37 |
+
**kwargs: keyword arguments forwarded to super.
|
38 |
+
"""
|
39 |
+
super(WikitextTl39Config, self).__init__(
|
40 |
+
version=datasets.Version(
|
41 |
+
"1.0.0",
|
42 |
+
),
|
43 |
+
**kwargs,
|
44 |
+
)
|
45 |
+
self.data_url = data_url
|
46 |
+
|
47 |
+
|
48 |
+
class WikitextTl39(datasets.GeneratorBasedBuilder):
|
49 |
+
VERSION = datasets.Version("1.0.0")
|
50 |
+
BUILDER_CONFIGS = [
|
51 |
+
WikitextTl39Config(
|
52 |
+
name="wikitext-tl-39",
|
53 |
+
data_url=_DATA_URL + "/" + "wikitext-tl-39.zip",
|
54 |
+
description=_DESCRIPTION,
|
55 |
+
),
|
56 |
+
]
|
57 |
+
BUILDER_CONFIG_CLASS = WikitextTl39Config
|
58 |
+
|
59 |
+
def _info(self):
|
60 |
+
# TODO(wikitext): Specifies the datasets.DatasetInfo object
|
61 |
+
return datasets.DatasetInfo(
|
62 |
+
# This is the description that will appear on the datasets page.
|
63 |
+
description=_DESCRIPTION,
|
64 |
+
# datasets.features.FeatureConnectors
|
65 |
+
features=datasets.Features(
|
66 |
+
{
|
67 |
+
"text": datasets.Value("string")
|
68 |
+
# These are the features of your dataset like images, labels ...
|
69 |
+
}
|
70 |
+
),
|
71 |
+
# If there's a common (input, target) tuple from the features,
|
72 |
+
# specify them here. They'll be used if as_supervised=True in
|
73 |
+
# builder.as_dataset.
|
74 |
+
supervised_keys=None,
|
75 |
+
# Homepage of the dataset for documentation
|
76 |
+
homepage=_URL,
|
77 |
+
citation=_CITATION,
|
78 |
+
license=_LICENSE,
|
79 |
+
)
|
80 |
+
|
81 |
+
def _split_generators(self, dl_manager):
|
82 |
+
"""Returns SplitGenerators."""
|
83 |
+
# TODO(wikitext): Downloads the data and defines the splits
|
84 |
+
# dl_manager is a datasets.download.DownloadManager that can be used to
|
85 |
+
# download and extract URLs
|
86 |
+
if self.config.name == "wikitext-tl-39":
|
87 |
+
data_file = dl_manager.download_and_extract(self.config.data_url)
|
88 |
+
data_dir = os.path.join(data_file, "wikitext-tl-39")
|
89 |
+
return [
|
90 |
+
datasets.SplitGenerator(
|
91 |
+
name=datasets.Split.TEST,
|
92 |
+
gen_kwargs={"data_file": os.path.join(data_dir, "test.txt"), "split": "test"},
|
93 |
+
),
|
94 |
+
datasets.SplitGenerator(
|
95 |
+
name=datasets.Split.TRAIN,
|
96 |
+
gen_kwargs={"data_file": os.path.join(data_dir, "train.txt"), "split": "train"},
|
97 |
+
),
|
98 |
+
datasets.SplitGenerator(
|
99 |
+
name=datasets.Split.VALIDATION,
|
100 |
+
gen_kwargs={"data_file": os.path.join(data_dir, "valid.txt"), "split": "valid"},
|
101 |
+
),
|
102 |
+
]
|
103 |
+
|
104 |
+
def _generate_examples(self, data_file, split):
|
105 |
+
|
106 |
+
"""Yields examples."""
|
107 |
+
# TODO(wikitext): Yields (key, example) tuples from the dataset
|
108 |
+
with open(data_file, encoding="utf-8") as f:
|
109 |
+
for idx, row in enumerate(f):
|
110 |
+
if row.strip():
|
111 |
+
yield idx, {"text": row}
|
112 |
+
else:
|
113 |
+
yield idx, {"text": ""}
|