Datasets:

ArXiv:
License:
acc13027rk commited on
Commit
fc31b8b
0 Parent(s):

test commit

Browse files
Files changed (6) hide show
  1. README.md +3 -0
  2. data/cs.CL/test.txt +3 -0
  3. data/cs.CL/train.txt +3 -0
  4. data/cs.CL/valid.txt +3 -0
  5. m2d2.py +76 -0
  6. split_names.txt +239 -0
README.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ ---
data/cs.CL/test.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df53dee2e88f9677f449447a26c75139f8a57c61feac3157f45b3d1c1f1b576a
3
+ size 5000000
data/cs.CL/train.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa0dcc6f422510532510c5786993bc2534d7a0faa67e0d655882fea51bb55abe
3
+ size 446356434
data/cs.CL/valid.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdfb3fb4bf3fc9e54aa8772deb53b826440e99e8791b2769b49c0fdd9c4b0592
3
+ size 5000000
m2d2.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import os
3
+ from datasets import load_dataset
4
+
5
+ CITATION = """
6
+ @inproceedings{reid2022m2d2,
7
+ title={ {M2D2}: A Massively Multi-Domain Language Modeling Dataset },
8
+ author={ Machel Reid and Victor Zhong and Suchin Gururangan and Luke Zettlemoyer },
9
+ booktitle={ EMNLP },
10
+ year={ 2022 }
11
+ }
12
+ """
13
+
14
+ DESCRIPTION = """
15
+ M2D2 dataset from 'M2D2: A Massively Multi-Domain Language Modeling Dataset'
16
+ """
17
+ FEATURES = datasets.Features({"text": datasets.Value("string")})
18
+
19
+
20
+ def _URLS(split):
21
+ return f"https://hugginface.co/datasets/machelreid/m2d2/resolve/main/data/{split}"
22
+
23
+
24
+ with open("split_names.txt", "r") as f:
25
+ M2D2_SPLIT_NAMES = [i.split() for i in f.readlines()]
26
+
27
+
28
+ class M2D2Config(datasets.BuilderConfig):
29
+ def __init__(self, features, citation, **kwargs):
30
+ super().__init__(version=datasets.Version("1.0.0"), **kwargs)
31
+ self.features = features
32
+ self.citation = citation
33
+
34
+
35
+ class M2D2(datasets.GeneratorBasedBuilder):
36
+
37
+ BUILDER_CONFIGS = [
38
+ M2D2Config(name=name, features=FEATURES, citation=CITATION)
39
+ for name in M2D2_SPLIT_NAMES
40
+ ]
41
+
42
+ def _info(self):
43
+ return datasets.DatasetInfo(
44
+ description=DESCRIPTION, citation=CITATION, features=FEATURES
45
+ )
46
+
47
+ def _split_generators(self, dl_manager):
48
+ urls = _URLS(self.config.name)
49
+
50
+ data_dir = dl_manager.download_and_extract(urls)
51
+ return [
52
+ datasets.SplitGenerator(
53
+ name=datasets.Split.TRAIN,
54
+ gen_kwargs={
55
+ "filepath": os.path.join(data_dir, "train.txt"),
56
+ },
57
+ ),
58
+ datasets.SplitGenerator(
59
+ name=datasets.Split.VALIDATION,
60
+ gen_kwargs={
61
+ "filepath": os.path.join(data_dir, "valid.txt"),
62
+ },
63
+ ),
64
+ datasets.SplitGenerator(
65
+ name=datasets.Split.TRAIN,
66
+ gen_kwargs={
67
+ "filepath": os.path.join(data_dir, "test.txt"),
68
+ },
69
+ ),
70
+ ]
71
+
72
+ def _generate_examples(self, filepath):
73
+ with open(filepath, encoding="utf-8") as f:
74
+ for key, row in enumerate(f):
75
+ data = row.strip()
76
+ yield key, data
split_names.txt ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Art
2
+ Culture_and_the_arts
3
+ Culture_and_the_arts__Culture_and_Humanities
4
+ Culture_and_the_arts__Games_and_Toys
5
+ Culture_and_the_arts__Mass_media
6
+ Culture_and_the_arts__Performing_arts
7
+ Culture_and_the_arts__Sports_and_Recreation
8
+ Culture_and_the_arts__The_arts_and_Entertainment
9
+ Culture_and_the_arts__Visual_arts
10
+ General_referece
11
+ General_referece__Further_research_tools_and_topics
12
+ General_referece__Reference_works
13
+ Health_and_fitness
14
+ Health_and_fitness__Exercise
15
+ Health_and_fitness__Health_science
16
+ Health_and_fitness__Human_medicine
17
+ Health_and_fitness__Nutrition
18
+ Health_and_fitness__Public_health
19
+ Health_and_fitness__Self_care
20
+ History_and_events
21
+ History_and_events__By_continent
22
+ History_and_events__By_period
23
+ History_and_events__By_region
24
+ Human_activites
25
+ Human_activites__Human_activities
26
+ Human_activites__Impact_of_human_activity
27
+ Mathematics_and_logic
28
+ Mathematics_and_logic__Fields_of_mathematics
29
+ Mathematics_and_logic__Logic
30
+ Mathematics_and_logic__Mathematics
31
+ Natural_and_physical_sciences
32
+ Natural_and_physical_sciences__Biology
33
+ Natural_and_physical_sciences__Earth_sciences
34
+ Natural_and_physical_sciences__Nature
35
+ Natural_and_physical_sciences__Physical_sciences
36
+ Philosophy
37
+ Philosophy_and_thinking
38
+ Philosophy_and_thinking__Philosophy
39
+ Philosophy_and_thinking__Thinking
40
+ Religion_and_belief_systems
41
+ Religion_and_belief_systems__Allah
42
+ Religion_and_belief_systems__Belief_systems
43
+ Religion_and_belief_systems__Major_beliefs_of_the_world
44
+ Society_and_social_sciences
45
+ Society_and_social_sciences__Social_sciences
46
+ Society_and_social_sciences__Society
47
+ Technology_and_applied_sciences
48
+ Technology_and_applied_sciences__Agriculture
49
+ Technology_and_applied_sciences__Computing
50
+ Technology_and_applied_sciences__Engineering
51
+ Technology_and_applied_sciences__Transport
52
+ alg-geom
53
+ ao-sci
54
+ astro-ph
55
+ astro-ph.CO
56
+ astro-ph.EP
57
+ astro-ph.GA
58
+ astro-ph.HE
59
+ astro-ph.IM
60
+ astro-ph.SR
61
+ astro-ph_l1
62
+ atom-ph
63
+ bayes-an
64
+ chao-dyn
65
+ chem-ph
66
+ cmp-lg
67
+ comp-gas
68
+ cond-mat
69
+ cond-mat.dis-nn
70
+ cond-mat.mes-hall
71
+ cond-mat.mtrl-sci
72
+ cond-mat.other
73
+ cond-mat.quant-gas
74
+ cond-mat.soft
75
+ cond-mat.stat-mech
76
+ cond-mat.str-el
77
+ cond-mat.supr-con
78
+ cond-mat_l1
79
+ cs.AI
80
+ cs.AR
81
+ cs.CC
82
+ cs.CE
83
+ cs.CG
84
+ cs.CL
85
+ cs.CR
86
+ cs.CV
87
+ cs.CY
88
+ cs.DB
89
+ cs.DC
90
+ cs.DL
91
+ cs.DM
92
+ cs.DS
93
+ cs.ET
94
+ cs.FL
95
+ cs.GL
96
+ cs.GR
97
+ cs.GT
98
+ cs.HC
99
+ cs.IR
100
+ cs.IT
101
+ cs.LG
102
+ cs.LO
103
+ cs.MA
104
+ cs.MM
105
+ cs.MS
106
+ cs.NA
107
+ cs.NE
108
+ cs.NI
109
+ cs.OH
110
+ cs.OS
111
+ cs.PF
112
+ cs.PL
113
+ cs.RO
114
+ cs.SC
115
+ cs.SD
116
+ cs.SE
117
+ cs.SI
118
+ cs.SY
119
+ cs_l1
120
+ dg-ga
121
+ econ.EM
122
+ econ.GN
123
+ econ.TH
124
+ econ_l1
125
+ eess.AS
126
+ eess.IV
127
+ eess.SP
128
+ eess.SY
129
+ eess_l1
130
+ eval_sets
131
+ funct-an
132
+ gr-qc
133
+ hep-ex
134
+ hep-lat
135
+ hep-ph
136
+ hep-th
137
+ math-ph
138
+ math.AC
139
+ math.AG
140
+ math.AP
141
+ math.AT
142
+ math.CA
143
+ math.CO
144
+ math.CT
145
+ math.CV
146
+ math.DG
147
+ math.DS
148
+ math.FA
149
+ math.GM
150
+ math.GN
151
+ math.GR
152
+ math.GT
153
+ math.HO
154
+ math.IT
155
+ math.KT
156
+ math.LO
157
+ math.MG
158
+ math.MP
159
+ math.NA
160
+ math.NT
161
+ math.OA
162
+ math.OC
163
+ math.PR
164
+ math.QA
165
+ math.RA
166
+ math.RT
167
+ math.SG
168
+ math.SP
169
+ math.ST
170
+ math_l1
171
+ mtrl-th
172
+ nlin.AO
173
+ nlin.CD
174
+ nlin.CG
175
+ nlin.PS
176
+ nlin.SI
177
+ nlin_l1
178
+ nucl-ex
179
+ nucl-th
180
+ only_text
181
+ only_txt2
182
+ patt-sol
183
+ physics.acc-ph
184
+ physics.ao-ph
185
+ physics.app-ph
186
+ physics.atm-clus
187
+ physics.atom-ph
188
+ physics.bio-ph
189
+ physics.chem-ph
190
+ physics.class-ph
191
+ physics.comp-ph
192
+ physics.data-an
193
+ physics.ed-ph
194
+ physics.flu-dyn
195
+ physics.gen-ph
196
+ physics.geo-ph
197
+ physics.hist-ph
198
+ physics.ins-det
199
+ physics.med-ph
200
+ physics.optics
201
+ physics.plasm-ph
202
+ physics.pop-ph
203
+ physics.soc-ph
204
+ physics.space-ph
205
+ physics_l1
206
+ plasm-ph
207
+ q-alg
208
+ q-bio
209
+ q-bio.BM
210
+ q-bio.CB
211
+ q-bio.GN
212
+ q-bio.MN
213
+ q-bio.NC
214
+ q-bio.OT
215
+ q-bio.PE
216
+ q-bio.QM
217
+ q-bio.SC
218
+ q-bio.TO
219
+ q-bio_l1
220
+ q-fin.CP
221
+ q-fin.EC
222
+ q-fin.GN
223
+ q-fin.MF
224
+ q-fin.PM
225
+ q-fin.PR
226
+ q-fin.RM
227
+ q-fin.ST
228
+ q-fin.TR
229
+ q-fin_l1
230
+ quant-ph
231
+ solv-int
232
+ stat.AP
233
+ stat.CO
234
+ stat.ME
235
+ stat.ML
236
+ stat.OT
237
+ stat.TH
238
+ stat_l1
239
+ supr-con