Commit
•
126d222
0
Parent(s):
Update files from the datasets library (from 1.0.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.0.0
- .gitattributes +27 -0
- dummy/plain_text/1.0.0/dummy_data.zip +3 -0
- dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/news.en.heldout-00016-of-00050 +5 -0
- dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/news.en.heldout-00017-of-00050 +10 -0
- dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/news.en-00016-of-00100 +10 -0
- dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/news.en-00017-of-00100 +5 -0
- lm1b.py +118 -0
- urls_checksums/cached_sizes.txt +3 -0
- urls_checksums/checksums.txt +2 -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
|
dummy/plain_text/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4206bd1bbff6bf1ac149bc7a81b3a75ab921980f06bfb3b2f1c5a9f7b5778198
|
3 |
+
size 4955
|
dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/news.en.heldout-00016-of-00050
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Kidd said after the game that he was fighting a head cold but made it clear he did not want the illness to be a continuing story .
|
2 |
+
Energy supplies to Europe could be disrupted again this winter after Russia cut oil supplies to neighbouring Belarus in a dispute over tariffs .
|
3 |
+
The Palestinian , Elias Khoury , lost his 20-year-old son , George , six years ago when he was killed by an Arab gunman who mistook him for a Jew .
|
4 |
+
Administration officials have said the full impact on the economy of the worst housing slump in 16 years and wildly gyrating financial markets has yet to play out .
|
5 |
+
BofA on Tuesday offloaded a $ 7.3bn chunk of stock in the Chinese lender .
|
dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/news.en.heldout-00017-of-00050
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Aviva , the insurer , was 2.5 per cent higher at 348 ½ p .
|
2 |
+
The boys spent a month in a children 's penitentiary awaiting trial .
|
3 |
+
So there is no reason why the corporation cannot create a channel aimed at 16 to 34-year-olds , although when it does so it must strive for a quality and originality that is not found elsewhere .
|
4 |
+
Domestic sales of fuel-efficient cars grew in Japan thanks in part to the government 's tax breaks for environmentally friendly vehicles while demand was also robust in emerging markets such as Brazil and Southeast Asia , it said .
|
5 |
+
How are things with her ?
|
6 |
+
Guede has appealed .
|
7 |
+
The many comments , only read a few so far , have done a yeomen 's job .
|
8 |
+
Mr Barofsky said that the lawsuit would send a " powerful message " to anyone attempting to default the Tarp .
|
9 |
+
The US Drugs Enforcement Agency says he was one of the main sources of Colombian cocaine smuggled into America in the 1990s .
|
10 |
+
But that is part and parcel of the democracy which Thailand , conspicuous among Asean members , lacks .
|
dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/news.en-00016-of-00100
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The group says it now has more than 800 priests and 2,500 seminarians worldwide , along with 50,000 Regnum Christi members .
|
2 |
+
Manager Sir Alex Ferguson could freshen his side up against City with Ryan Giggs , Dimitar Berbatov , Darren Fletcher and John O 'Shea all pushing for a re-call .
|
3 |
+
But for years and years , I could stand genuine empathy only five minutes at a time .
|
4 |
+
On the environment , American diplomacy and nuclear proliferation , Mr. McCain has strikingly different views from Mr. Bush , and while he shares the president 's goals in Iraq , he was at times an outspoken critic of the way the war was managed .
|
5 |
+
New measures to tackle the problem will include the " Al Capone " approach of targeting criminals for tax evasion .
|
6 |
+
The ECB have said that Stuart Broad has been sent for precautionary scans after jarring his right shoulder in fielding practice .
|
7 |
+
Aerobic activity is far and away the best , for one simple reason : You burn more calories .
|
8 |
+
Despite Gordon Brown 's assertions that there will be no negotiations with Taleban hardliners , the one-time spokesman for Mullah Omar - the movement 's supreme leader - said he has been relaying messages from Kabul to senior insurgent commanders in Pakistan for months .
|
9 |
+
It could be the breakdown of the " Goldilocks era " for global commodities - a period stretching back more than 30 years , during which the price of basic foodstuffs has been neither too high nor too low , but remained relatively constant .
|
10 |
+
Both statements are true , though it 's not clear who , if anyone , had been saying that the legislation drafted by the powerful chairman of the Senate Health Education Labor and Pension Committee constituted President Obama 's bill .
|
dummy/plain_text/1.0.0/dummy_data/1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/news.en-00017-of-00100
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
He was elected speaker after democracy was restored in 2001 , and held ministerial posts after the 2006 coup .
|
2 |
+
The prison has about 1,380 inmates and 630 employees .
|
3 |
+
VW shares jumped by 3.26 percent to 202.42 euros in morning trades on the Frankfurt stock exchange while the Dax index of leading shares was 1.30 percent higher overall .
|
4 |
+
His wife explained that every time he went past a cash machine he couldn 't resist taking money out .
|
5 |
+
Arshavin , though , is telling only half the story .
|
lm1b.py
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""The Language Model 1 Billion dataset."""
|
18 |
+
|
19 |
+
from __future__ import absolute_import, division, print_function
|
20 |
+
|
21 |
+
import glob
|
22 |
+
import logging
|
23 |
+
import os
|
24 |
+
|
25 |
+
import datasets
|
26 |
+
|
27 |
+
|
28 |
+
_CITATION = """\
|
29 |
+
@article{DBLP:journals/corr/ChelbaMSGBK13,
|
30 |
+
author = {Ciprian Chelba and
|
31 |
+
Tomas Mikolov and
|
32 |
+
Mike Schuster and
|
33 |
+
Qi Ge and
|
34 |
+
Thorsten Brants and
|
35 |
+
Phillipp Koehn},
|
36 |
+
title = {One Billion Word Benchmark for Measuring Progress in Statistical Language
|
37 |
+
Modeling},
|
38 |
+
journal = {CoRR},
|
39 |
+
volume = {abs/1312.3005},
|
40 |
+
year = {2013},
|
41 |
+
url = {http://arxiv.org/abs/1312.3005},
|
42 |
+
archivePrefix = {arXiv},
|
43 |
+
eprint = {1312.3005},
|
44 |
+
timestamp = {Mon, 13 Aug 2018 16:46:16 +0200},
|
45 |
+
biburl = {https://dblp.org/rec/bib/journals/corr/ChelbaMSGBK13},
|
46 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
47 |
+
}
|
48 |
+
"""
|
49 |
+
|
50 |
+
_DESCRIPTION = """\
|
51 |
+
A benchmark corpus to be used for measuring progress in statistical language \
|
52 |
+
modeling. This has almost one billion words in the training data.
|
53 |
+
"""
|
54 |
+
|
55 |
+
_DOWNLOAD_URL = "http://www.statmt.org/lm-benchmark/" "1-billion-word-language-modeling-benchmark-r13output.tar.gz"
|
56 |
+
_TOP_LEVEL_DIR = "1-billion-word-language-modeling-benchmark-r13output"
|
57 |
+
_TRAIN_FILE_FORMAT = os.path.join(_TOP_LEVEL_DIR, "training-monolingual.tokenized.shuffled", "news.en-*")
|
58 |
+
_HELDOUT_FILE_FORMAT = os.path.join(_TOP_LEVEL_DIR, "heldout-monolingual.tokenized.shuffled", "news.en.heldout-*")
|
59 |
+
|
60 |
+
|
61 |
+
class Lm1bConfig(datasets.BuilderConfig):
|
62 |
+
"""BuilderConfig for Lm1b."""
|
63 |
+
|
64 |
+
def __init__(self, **kwargs):
|
65 |
+
"""BuilderConfig for Lm1b.
|
66 |
+
|
67 |
+
Args:
|
68 |
+
**kwargs: keyword arguments forwarded to super.
|
69 |
+
"""
|
70 |
+
super(Lm1bConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
71 |
+
|
72 |
+
|
73 |
+
def _train_data_filenames(tmp_dir):
|
74 |
+
return sorted(glob.glob(os.path.join(tmp_dir, _TRAIN_FILE_FORMAT)))
|
75 |
+
|
76 |
+
|
77 |
+
def _test_data_filenames(tmp_dir):
|
78 |
+
return sorted(glob.glob(os.path.join(tmp_dir, _HELDOUT_FILE_FORMAT)))
|
79 |
+
|
80 |
+
|
81 |
+
class Lm1b(datasets.GeneratorBasedBuilder):
|
82 |
+
"""1 Billion Word Language Model Benchmark dataset."""
|
83 |
+
|
84 |
+
BUILDER_CONFIGS = [
|
85 |
+
Lm1bConfig(
|
86 |
+
name="plain_text",
|
87 |
+
description="Plain text",
|
88 |
+
),
|
89 |
+
]
|
90 |
+
|
91 |
+
def _info(self):
|
92 |
+
return datasets.DatasetInfo(
|
93 |
+
description=_DESCRIPTION,
|
94 |
+
features=datasets.Features({"text": datasets.Value("string")}),
|
95 |
+
supervised_keys=("text", "text"),
|
96 |
+
homepage="http://www.statmt.org/lm-benchmark/",
|
97 |
+
citation=_CITATION,
|
98 |
+
)
|
99 |
+
|
100 |
+
def _split_generators(self, dl_manager):
|
101 |
+
lm1b_path = dl_manager.download_and_extract(_DOWNLOAD_URL)
|
102 |
+
|
103 |
+
train_files = _train_data_filenames(lm1b_path)
|
104 |
+
test_files = _test_data_filenames(lm1b_path)
|
105 |
+
|
106 |
+
return [
|
107 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"files": train_files}),
|
108 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"files": test_files}),
|
109 |
+
]
|
110 |
+
|
111 |
+
def _generate_examples(self, files):
|
112 |
+
for filepath in files:
|
113 |
+
logging.info("generating examples from = %s", filepath)
|
114 |
+
with open(filepath, encoding="utf-8") as f:
|
115 |
+
for idx, line in enumerate(f):
|
116 |
+
yield "%s_%d" % (os.path.basename(filepath), idx), {
|
117 |
+
"text": line.strip(),
|
118 |
+
}
|
urls_checksums/cached_sizes.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Cached sizes: <full_config_name> <num_bytes> <num_examples>
|
2 |
+
lm1b/plain_text/1.0.0/test 42941937 306688
|
3 |
+
lm1b/plain_text/1.0.0/train 4238195608 30301028
|
urls_checksums/checksums.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# Checksums: <url> <num_bytes> <sha256>
|
2 |
+
http://www.statmt.org/lm-benchmark/1-billion-word-language-modeling-benchmark-r13output.tar.gz 1792209805 01ba60381110baf7f189dfd2b8374de371e8c9a340835793f190bdae9e90a34e
|