debug
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- .gitattributes +2 -0
- bernice-pretrain-data.py +9 -6
- data/{2016_01.txt.gz β all/2016_01.txt.gz} +0 -0
- data/{2016_02.txt.gz β all/2016_02.txt.gz} +0 -0
- data/{2016_03.txt.gz β all/2016_03.txt.gz} +0 -0
- data/{2016_04.txt.gz β all/2016_04.txt.gz} +0 -0
- data/{2016_05.txt.gz β all/2016_05.txt.gz} +0 -0
- data/{2016_06.txt.gz β all/2016_06.txt.gz} +0 -0
- data/{2016_07.txt.gz β all/2016_07.txt.gz} +0 -0
- data/{2016_08.txt.gz β all/2016_08.txt.gz} +0 -0
- data/{2016_09.txt.gz β all/2016_09.txt.gz} +0 -0
- data/{2016_10.txt.gz β all/2016_10.txt.gz} +0 -0
- data/{2016_11.txt.gz β all/2016_11.txt.gz} +0 -0
- data/{2016_12.txt.gz β all/2016_12.txt.gz} +0 -0
- data/{2017_01.txt.gz β all/2017_01.txt.gz} +0 -0
- data/{2017_02.txt.gz β all/2017_02.txt.gz} +0 -0
- data/{2017_03.txt.gz β all/2017_03.txt.gz} +0 -0
- data/{2017_04.txt.gz β all/2017_04.txt.gz} +0 -0
- data/{2017_05.txt.gz β all/2017_05.txt.gz} +0 -0
- data/{2017_06.txt.gz β all/2017_06.txt.gz} +0 -0
- data/{2017_07.txt.gz β all/2017_07.txt.gz} +0 -0
- data/{2017_09.txt.gz β all/2017_09.txt.gz} +0 -0
- data/{2017_10.txt.gz β all/2017_10.txt.gz} +0 -0
- data/{2017_11.txt.gz β all/2017_11.txt.gz} +0 -0
- data/{2017_12.txt.gz β all/2017_12.txt.gz} +0 -0
- data/{2018_01.txt.gz β all/2018_01.txt.gz} +0 -0
- data/{2018_02.txt.gz β all/2018_02.txt.gz} +0 -0
- data/{2018_03.txt.gz β all/2018_03.txt.gz} +0 -0
- data/{2018_04.txt.gz β all/2018_04.txt.gz} +0 -0
- data/{2018_05.txt.gz β all/2018_05.txt.gz} +0 -0
- data/{2018_06.txt.gz β all/2018_06.txt.gz} +0 -0
- data/{2018_07.txt.gz β all/2018_07.txt.gz} +0 -0
- data/{2018_08.txt.gz β all/2018_08.txt.gz} +0 -0
- data/{2018_09.txt.gz β all/2018_09.txt.gz} +0 -0
- data/{2018_10.txt.gz β all/2018_10.txt.gz} +0 -0
- data/{2018_11.txt.gz β all/2018_11.txt.gz} +0 -0
- data/{2018_12.txt.gz β all/2018_12.txt.gz} +0 -0
- data/{2019_01.txt.gz β all/2019_01.txt.gz} +0 -0
- data/{2019_02.txt.gz β all/2019_02.txt.gz} +0 -0
- data/{2019_03.txt.gz β all/2019_03.txt.gz} +0 -0
- data/{2019_04.txt.gz β all/2019_04.txt.gz} +0 -0
- data/{2019_05.txt.gz β all/2019_05.txt.gz} +0 -0
- data/{2019_06.txt.gz β all/2019_06.txt.gz} +0 -0
- data/{2019_07.txt.gz β all/2019_07.txt.gz} +0 -0
- data/{2019_08.txt.gz β all/2019_08.txt.gz} +0 -0
- data/{2019_09.txt.gz β all/2019_09.txt.gz} +0 -0
- data/{2019_10.txt.gz β all/2019_10.txt.gz} +0 -0
- data/{2019_11.txt.gz β all/2019_11.txt.gz} +0 -0
- data/{2019_12.txt.gz β all/2019_12.txt.gz} +0 -0
- data/{2020_01.txt.gz β all/2020_01.txt.gz} +0 -0
.gitattributes
CHANGED
@@ -125,3 +125,5 @@ data/2021_09.txt.gz filter=lfs diff=lfs merge=lfs -text
|
|
125 |
data/2017_07.txt.gz filter=lfs diff=lfs merge=lfs -text
|
126 |
data/2017_09.txt.gz filter=lfs diff=lfs merge=lfs -text
|
127 |
indic_tweet_ids.txt.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
125 |
data/2017_07.txt.gz filter=lfs diff=lfs merge=lfs -text
|
126 |
data/2017_09.txt.gz filter=lfs diff=lfs merge=lfs -text
|
127 |
indic_tweet_ids.txt.gz filter=lfs diff=lfs merge=lfs -text
|
128 |
+
data/all filter=lfs diff=lfs merge=lfs -text
|
129 |
+
data/indic filter=lfs diff=lfs merge=lfs -text
|
bernice-pretrain-data.py
CHANGED
@@ -21,7 +21,6 @@ import os
|
|
21 |
import gzip
|
22 |
import datasets
|
23 |
|
24 |
-
|
25 |
# TODO: Add BibTeX citation
|
26 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
27 |
_CITATION = """\
|
@@ -51,10 +50,11 @@ _LICENSE = ""
|
|
51 |
# If the data files live in the same folder or repository of the dataset script,
|
52 |
# you can just pass the relative paths to the files instead of URLs.
|
53 |
# Only train data, validation split not provided
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
58 |
|
59 |
|
60 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
@@ -113,7 +113,10 @@ class BernicePretrainData(datasets.GeneratorBasedBuilder):
|
|
113 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
114 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
115 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
116 |
-
|
|
|
|
|
|
|
117 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
118 |
return [
|
119 |
datasets.SplitGenerator(
|
|
|
21 |
import gzip
|
22 |
import datasets
|
23 |
|
|
|
24 |
# TODO: Add BibTeX citation
|
25 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
26 |
_CITATION = """\
|
|
|
50 |
# If the data files live in the same folder or repository of the dataset script,
|
51 |
# you can just pass the relative paths to the files instead of URLs.
|
52 |
# Only train data, validation split not provided
|
53 |
+
_BASE_DATA_URL = "data"
|
54 |
+
# _URLS = {
|
55 |
+
# "all": f"{_BASE_URL}",
|
56 |
+
# "indic": ["data/indic_tweet_ids.txt.gz"]
|
57 |
+
# }
|
58 |
|
59 |
|
60 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
|
|
113 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
114 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
115 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
116 |
+
data_url = f"{self._BASE_DATA_URL}/{self.config.name}"
|
117 |
+
print(f"{data_url=}")
|
118 |
+
print(f"{os.listdir()}")
|
119 |
+
urls_to_download = [f"{data_url}/{f}" for f in os.listdir(data_url)]
|
120 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
121 |
return [
|
122 |
datasets.SplitGenerator(
|
data/{2016_01.txt.gz β all/2016_01.txt.gz}
RENAMED
File without changes
|
data/{2016_02.txt.gz β all/2016_02.txt.gz}
RENAMED
File without changes
|
data/{2016_03.txt.gz β all/2016_03.txt.gz}
RENAMED
File without changes
|
data/{2016_04.txt.gz β all/2016_04.txt.gz}
RENAMED
File without changes
|
data/{2016_05.txt.gz β all/2016_05.txt.gz}
RENAMED
File without changes
|
data/{2016_06.txt.gz β all/2016_06.txt.gz}
RENAMED
File without changes
|
data/{2016_07.txt.gz β all/2016_07.txt.gz}
RENAMED
File without changes
|
data/{2016_08.txt.gz β all/2016_08.txt.gz}
RENAMED
File without changes
|
data/{2016_09.txt.gz β all/2016_09.txt.gz}
RENAMED
File without changes
|
data/{2016_10.txt.gz β all/2016_10.txt.gz}
RENAMED
File without changes
|
data/{2016_11.txt.gz β all/2016_11.txt.gz}
RENAMED
File without changes
|
data/{2016_12.txt.gz β all/2016_12.txt.gz}
RENAMED
File without changes
|
data/{2017_01.txt.gz β all/2017_01.txt.gz}
RENAMED
File without changes
|
data/{2017_02.txt.gz β all/2017_02.txt.gz}
RENAMED
File without changes
|
data/{2017_03.txt.gz β all/2017_03.txt.gz}
RENAMED
File without changes
|
data/{2017_04.txt.gz β all/2017_04.txt.gz}
RENAMED
File without changes
|
data/{2017_05.txt.gz β all/2017_05.txt.gz}
RENAMED
File without changes
|
data/{2017_06.txt.gz β all/2017_06.txt.gz}
RENAMED
File without changes
|
data/{2017_07.txt.gz β all/2017_07.txt.gz}
RENAMED
File without changes
|
data/{2017_09.txt.gz β all/2017_09.txt.gz}
RENAMED
File without changes
|
data/{2017_10.txt.gz β all/2017_10.txt.gz}
RENAMED
File without changes
|
data/{2017_11.txt.gz β all/2017_11.txt.gz}
RENAMED
File without changes
|
data/{2017_12.txt.gz β all/2017_12.txt.gz}
RENAMED
File without changes
|
data/{2018_01.txt.gz β all/2018_01.txt.gz}
RENAMED
File without changes
|
data/{2018_02.txt.gz β all/2018_02.txt.gz}
RENAMED
File without changes
|
data/{2018_03.txt.gz β all/2018_03.txt.gz}
RENAMED
File without changes
|
data/{2018_04.txt.gz β all/2018_04.txt.gz}
RENAMED
File without changes
|
data/{2018_05.txt.gz β all/2018_05.txt.gz}
RENAMED
File without changes
|
data/{2018_06.txt.gz β all/2018_06.txt.gz}
RENAMED
File without changes
|
data/{2018_07.txt.gz β all/2018_07.txt.gz}
RENAMED
File without changes
|
data/{2018_08.txt.gz β all/2018_08.txt.gz}
RENAMED
File without changes
|
data/{2018_09.txt.gz β all/2018_09.txt.gz}
RENAMED
File without changes
|
data/{2018_10.txt.gz β all/2018_10.txt.gz}
RENAMED
File without changes
|
data/{2018_11.txt.gz β all/2018_11.txt.gz}
RENAMED
File without changes
|
data/{2018_12.txt.gz β all/2018_12.txt.gz}
RENAMED
File without changes
|
data/{2019_01.txt.gz β all/2019_01.txt.gz}
RENAMED
File without changes
|
data/{2019_02.txt.gz β all/2019_02.txt.gz}
RENAMED
File without changes
|
data/{2019_03.txt.gz β all/2019_03.txt.gz}
RENAMED
File without changes
|
data/{2019_04.txt.gz β all/2019_04.txt.gz}
RENAMED
File without changes
|
data/{2019_05.txt.gz β all/2019_05.txt.gz}
RENAMED
File without changes
|
data/{2019_06.txt.gz β all/2019_06.txt.gz}
RENAMED
File without changes
|
data/{2019_07.txt.gz β all/2019_07.txt.gz}
RENAMED
File without changes
|
data/{2019_08.txt.gz β all/2019_08.txt.gz}
RENAMED
File without changes
|
data/{2019_09.txt.gz β all/2019_09.txt.gz}
RENAMED
File without changes
|
data/{2019_10.txt.gz β all/2019_10.txt.gz}
RENAMED
File without changes
|
data/{2019_11.txt.gz β all/2019_11.txt.gz}
RENAMED
File without changes
|
data/{2019_12.txt.gz β all/2019_12.txt.gz}
RENAMED
File without changes
|
data/{2020_01.txt.gz β all/2020_01.txt.gz}
RENAMED
File without changes
|