parquet-converter commited on
Commit
e1937bd
1 Parent(s): 63ce731

Update parquet files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. Cropinky--rap_lyrics_english/text-train.parquet +3 -0
  3. README.md +0 -4
  4. Untitled.ipynb +0 -415
  5. data/Lilgpt.txt +0 -8
  6. data/MFDOOM.txt +0 -0
  7. data/flowmasteri.txt +0 -8
  8. data/wutang.txt +0 -11
  9. data/ye.txt +0 -1
  10. data/zenske.txt +0 -11
  11. genius.py +0 -38
  12. songs/Lilgpt.txt +0 -0
  13. songs/Lilgpt/Boosie Badazz.txt +0 -0
  14. songs/Lilgpt/Lil Baby.txt +0 -0
  15. songs/Lilgpt/Lil Durk.txt +0 -0
  16. songs/Lilgpt/Lil Flip.txt +0 -0
  17. songs/Lilgpt/Lil Peep.txt +0 -0
  18. songs/Lilgpt/Lil Pump.txt +0 -0
  19. songs/Lilgpt/Lil Reese.txt +0 -0
  20. songs/Lilgpt/Lil Uzi Vert.txt +0 -0
  21. songs/Lilgpt/Lil Wayne.txt +0 -0
  22. songs/flowmasteri.txt +0 -0
  23. songs/flowmasteri/50 Cent.txt +0 -0
  24. songs/flowmasteri/Action Bronson.txt +0 -0
  25. songs/flowmasteri/Big L.txt +0 -0
  26. songs/flowmasteri/Big Pun.txt +0 -0
  27. songs/flowmasteri/ILL BILL.txt +0 -0
  28. songs/flowmasteri/Nas.txt +0 -0
  29. songs/flowmasteri/Prodigy of Mobb Deep.txt +0 -0
  30. songs/flowmasteri/The Notorious B.I.G..txt +0 -0
  31. songs/lyricstotxt.py +0 -21
  32. songs/wutang.txt +0 -0
  33. songs/wutang/Cappadonna.txt +0 -0
  34. songs/wutang/GZA.txt +0 -0
  35. songs/wutang/Ghostface Killah.txt +0 -0
  36. songs/wutang/Inspectah Deck.txt +0 -0
  37. songs/wutang/Masta Killa.txt +0 -0
  38. songs/wutang/Method Man.txt +0 -0
  39. songs/wutang/Ol’ Dirty Bastard.txt +0 -0
  40. songs/wutang/RZA.txt +0 -0
  41. songs/wutang/Raekwon.txt +0 -0
  42. songs/wutang/U-God.txt +0 -0
  43. songs/wutang/Wu-Tang Clan.txt +0 -0
  44. songs/ye.txt +0 -0
  45. songs/ye/Kanye West.txt +0 -0
  46. songs/zenske.txt +0 -0
  47. songs/zenske/Jean Grae.txt +0 -0
  48. songs/zenske/Lauryn Hill.txt +0 -0
  49. songs/zenske/Lil’ Kim.txt +0 -0
  50. songs/zenske/MC Lyte.txt +0 -0
.gitattributes CHANGED
@@ -14,3 +14,4 @@
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
 
 
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
+ Cropinky--rap_lyrics_english/text-train.parquet filter=lfs diff=lfs merge=lfs -text
Cropinky--rap_lyrics_english/text-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7b94daccd20c0c1fb3e9524b8ccd66e9463eb7dd193f9b95f72d5b35a2c583a
3
+ size 28481718
README.md DELETED
@@ -1,4 +0,0 @@
1
- ## Rap lyrics dataset
2
-
3
- this is the repo containing the dataset we made for the hugging face community week, in order to download more songs you need to request and get(it's very simple and fast) your genius API key which ou put in the genius.py file<br/>
4
- #TODO: turn it into an actual huggingface dataset
 
 
 
 
 
Untitled.ipynb DELETED
@@ -1,415 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 2,
6
- "metadata": {},
7
- "outputs": [],
8
- "source": [
9
- "import pandas as pd\n",
10
- "import os\n",
11
- "import random\n",
12
- "from sklearn.model_selection import train_test_split\n",
13
- "from tqdm import tqdm"
14
- ]
15
- },
16
- {
17
- "cell_type": "code",
18
- "execution_count": 3,
19
- "metadata": {},
20
- "outputs": [],
21
- "source": [
22
- "def get_text_lists(filenames):\n",
23
- " text_list = []\n",
24
- " text_list_clean = []\n",
25
- " for filename in filenames:\n",
26
- " with open(filename,'r') as file:\n",
27
- " data = file.read()\n",
28
- " text_list = text_list + (data.split(\"<EOS>\"))\n",
29
- " \n",
30
- " for text in text_list:\n",
31
- " #remove trailing ugly things at end of strings\n",
32
- " text = text[0:text.find(\"EmbedShare\")]\n",
33
- " text_list_clean.append(text)\n",
34
- " return text_list_clean"
35
- ]
36
- },
37
- {
38
- "cell_type": "code",
39
- "execution_count": 5,
40
- "metadata": {},
41
- "outputs": [
42
- {
43
- "ename": "FileNotFoundError",
44
- "evalue": "[Errno 2] No such file or directory: 'novireperi.txt'",
45
- "output_type": "error",
46
- "traceback": [
47
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
48
- "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
49
- "\u001b[0;32m<ipython-input-5-974cc4a9f270>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m text_list = get_text_lists([\"Lilgpt.txt\", \"ye.txt\", \"zenske.txt\", \"flowmasteri.txt\",\n\u001b[0;32m----> 2\u001b[0;31m \"wutang.txt\", \"novireperi.txt\", \"novireperi2.txt\", \"novireperi3.txt\", \"OF.txt\"])\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtext_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
50
- "\u001b[0;32m<ipython-input-3-81b6d230f518>\u001b[0m in \u001b[0;36mget_text_lists\u001b[0;34m(filenames)\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mtext_list_clean\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mfilename\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mfilenames\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'r'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mtext_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtext_list\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"<EOS>\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
51
- "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'novireperi.txt'"
52
- ]
53
- }
54
- ],
55
- "source": [
56
- "text_list = get_text_lists([\"Lilgpt.txt\", \"ye.txt\", \"zenske.txt\", \"flowmasteri.txt\",\n",
57
- " \"wutang.txt\", \"novireperi.txt\", \"novireperi2.txt\", \"novireperi3.txt\", \"OF.txt\"])\n",
58
- "print(len(text_list))"
59
- ]
60
- },
61
- {
62
- "cell_type": "code",
63
- "execution_count": 4,
64
- "metadata": {
65
- "scrolled": true
66
- },
67
- "outputs": [
68
- {
69
- "name": "stdout",
70
- "output_type": "stream",
71
- "text": [
72
- "<BOS>3 Headed Goat[Intro]\n",
73
- "(Aviator)\n",
74
- "[Chorus: Lil Baby]\n",
75
- "These ain't no Guess jeans\n",
76
- "I dropped out of school, I'm still good at math, but, nigga, don't test me\n",
77
- "I played to the left, they went to the right, they tried to finesse me\n",
78
- "Still riding 'round with that blicky, I hope they don't catch me\n",
79
- "Police had raided our spot, so we went to the next street\n",
80
- "Play like I'm dumb, as soon as it pop, I'm goin' retarded\n",
81
- "He say I'm hard and he say I'm garbage, I'm rich regardless\n",
82
- "We in Miami in the middle of the winter, and we on them jet skis\n",
83
- "If we in Atlanta, I'm runnin' the 'Cat and I'm workin' the red key\n",
84
- "[Verse 1: Lil Durk]\n",
85
- "I cannot mention my homies inside of my song 'cause I know they be trappin' a lot\n",
86
- "I can't keep takin' these pills, when I'm in the trenches, they say I be cappin' a lot\n",
87
- "I know a nigga who say he got rich off the dope, but I know he be actin' a lot\n",
88
- "I know some niggas who said that they took down the city, but niggas be lackin' a lot\n",
89
- "Yeah\n",
90
- "That shit was awful, nigga had that dog food\n",
91
- "That day they shot you, I slid on a Mongoose\n",
92
- "You cannot come back around me, you turned your back on me, I cannot forget\n",
93
- "The police was lyin', they say that they caught you, but nigga, they made you admit\n",
94
- "Your name was found, you put in that work, they took your stick, you a bitch\n",
95
- "Fuck my opps, they be on my dick, they all be mad we rich (Turn up)\n",
96
- "[Verse 2: Lil Baby]\n",
97
- "Only twenty-five, livin' like a boss, ridin' 'round with a chauffeur\n",
98
- "I don't sell drugs, still be paranoid, keep lookin' over my shoulder\n",
99
- "Niggas lyin' like I'm stealin' swag, boy, that's my shit like I wrote it\n",
100
- "[Verse 3: Polo G]\n",
101
- "Uh\n",
102
- "These rappers really nice as hell\n",
103
- "I'm a different nigga when I'm pissed off\n",
104
- "Man, he say he gon' press up on who?\n",
105
- "I'ma get the steel like I'm Chris Paul\n",
106
- "Back to back suburbans, I'm a big dawg\n",
107
- "I was in the slums servin' Fentanyl\n",
108
- "Zombieland, junkies havin' withdrawals\n",
109
- "I been gettin' to it, lotta missed calls\n",
110
- "Turn it off, what the fuck is he talking 'bout?\n",
111
- "I should slap you for sayin' he hot as me\n",
112
- "I don't know who could fuck with me honestly\n",
113
- "They know I'm the man, so they watchin' me\n",
114
- "Different color bands like Monopoly\n",
115
- "Man, he must not be usin' his head\n",
116
- "If he thinkin' I don't keep a Glock with me\n",
117
- "That's like suicide if you play with us\n",
118
- "Got a better chance at the lottery\n",
119
- "Call an ambulance when that chopper sweep\n",
120
- "Make the crowd dance, choreography\n",
121
- "Once I got a plan, ain't no stoppin' me\n",
122
- "Three-car garage, million-dollar crib\n",
123
- "With a foreign bitch ridin' on top of me\n",
124
- "Lot of people done said I wouldn't be shit\n",
125
- "Well, I guess they owe me an apology\n",
126
- "[Chorus: Lil Baby]\n",
127
- "These ain't no Guess jeans\n",
128
- "I dropped out of school, I'm still good at math, but, nigga, don't test me\n",
129
- "I played to the left, they went to the right, they tried to finesse me\n",
130
- "Still riding 'round with that blicky, I hope they don't catch me\n",
131
- "Police had raided our spot, so we went to the next street\n",
132
- "Play like I'm dumb, as soon as it pop, I'm goin' retarded\n",
133
- "He say I'm hard and he say I'm garbage, I'm rich regardless\n",
134
- "We in Miami in the middle of the winter, and we on them jet skis\n",
135
- "If we in Atlanta, I'm runnin' the 'Cat and I'm workin' the red key35<EOS>\n"
136
- ]
137
- }
138
- ],
139
- "source": [
140
- "new_list = []\n",
141
- "for l in text_list:\n",
142
- " n = l\n",
143
- " n = n.replace(\"<BOS>\",\"\")\n",
144
- " n = os.linesep.join([s for s in n.splitlines() if s])\n",
145
- " n = \"<BOS>\"+ n + \"<EOS>\"\n",
146
- " new_list.append(n)"
147
- ]
148
- },
149
- {
150
- "cell_type": "code",
151
- "execution_count": 10,
152
- "metadata": {},
153
- "outputs": [
154
- {
155
- "name": "stdout",
156
- "output_type": "stream",
157
- "text": [
158
- "1287\n",
159
- "11583\n"
160
- ]
161
- }
162
- ],
163
- "source": [
164
- "List_train, List_val = train_test_split(new_list, test_size = 0.1, random_state = 420)\n",
165
- "print(len(List_val))\n",
166
- "print(len(List_train))"
167
- ]
168
- },
169
- {
170
- "cell_type": "code",
171
- "execution_count": 11,
172
- "metadata": {},
173
- "outputs": [
174
- {
175
- "name": "stderr",
176
- "output_type": "stream",
177
- "text": [
178
- "100%|█████████████████████████████████████| 1286/1286 [00:01<00:00, 1215.57it/s]\n"
179
- ]
180
- }
181
- ],
182
- "source": [
183
- "val_set = List_val[0]\n",
184
- "for i in tqdm(range(1,len(List_val))):\n",
185
- " val_set = val_set+\"\\n\\n\"+ List_val[i]"
186
- ]
187
- },
188
- {
189
- "cell_type": "code",
190
- "execution_count": 12,
191
- "metadata": {},
192
- "outputs": [
193
- {
194
- "name": "stderr",
195
- "output_type": "stream",
196
- "text": [
197
- "100%|█████████████████████████████████████| 11582/11582 [05:06<00:00, 37.77it/s]\n"
198
- ]
199
- }
200
- ],
201
- "source": [
202
- "train_set = List_train[0]\n",
203
- "for i in tqdm(range(1,len(List_train))):\n",
204
- " train_set = train_set+\"\\n\\n\"+List_train[i]"
205
- ]
206
- },
207
- {
208
- "cell_type": "code",
209
- "execution_count": 13,
210
- "metadata": {},
211
- "outputs": [],
212
- "source": [
213
- "file1 = open(\"train2.txt\",\"w+\")\n",
214
- "file1.write(train_set)\n",
215
- "file1.close()"
216
- ]
217
- },
218
- {
219
- "cell_type": "code",
220
- "execution_count": 14,
221
- "metadata": {},
222
- "outputs": [],
223
- "source": [
224
- "file2 = open(\"val2.txt\",\"w+\")\n",
225
- "file2.write(val_set)\n",
226
- "file2.close()"
227
- ]
228
- },
229
- {
230
- "cell_type": "code",
231
- "execution_count": 15,
232
- "metadata": {},
233
- "outputs": [
234
- {
235
- "data": {
236
- "text/html": [
237
- "<div>\n",
238
- "<style scoped>\n",
239
- " .dataframe tbody tr th:only-of-type {\n",
240
- " vertical-align: middle;\n",
241
- " }\n",
242
- "\n",
243
- " .dataframe tbody tr th {\n",
244
- " vertical-align: top;\n",
245
- " }\n",
246
- "\n",
247
- " .dataframe thead th {\n",
248
- " text-align: right;\n",
249
- " }\n",
250
- "</style>\n",
251
- "<table border=\"1\" class=\"dataframe\">\n",
252
- " <thead>\n",
253
- " <tr style=\"text-align: right;\">\n",
254
- " <th></th>\n",
255
- " <th>Songs</th>\n",
256
- " </tr>\n",
257
- " </thead>\n",
258
- " <tbody>\n",
259
- " <tr>\n",
260
- " <th>0</th>\n",
261
- " <td>&lt;BOS&gt;Night CourtBehind door one:\\nThere's thre...</td>\n",
262
- " </tr>\n",
263
- " <tr>\n",
264
- " <th>1</th>\n",
265
- " <td>&lt;BOS&gt;Golden ArmsYeah, yeah\\nYeah, yeah\\n[Verse...</td>\n",
266
- " </tr>\n",
267
- " <tr>\n",
268
- " <th>2</th>\n",
269
- " <td>&lt;BOS&gt;Flashing Lights (Clipse Remix)[Intro]\\nWe...</td>\n",
270
- " </tr>\n",
271
- " <tr>\n",
272
- " <th>3</th>\n",
273
- " <td>&lt;BOS&gt;Lights Camera Action[Intro]\\nThe lights, ...</td>\n",
274
- " </tr>\n",
275
- " <tr>\n",
276
- " <th>4</th>\n",
277
- " <td>&lt;BOS&gt;Thug Life [Souljah] (Original Version 1)[...</td>\n",
278
- " </tr>\n",
279
- " </tbody>\n",
280
- "</table>\n",
281
- "</div>"
282
- ],
283
- "text/plain": [
284
- " Songs\n",
285
- "0 <BOS>Night CourtBehind door one:\\nThere's thre...\n",
286
- "1 <BOS>Golden ArmsYeah, yeah\\nYeah, yeah\\n[Verse...\n",
287
- "2 <BOS>Flashing Lights (Clipse Remix)[Intro]\\nWe...\n",
288
- "3 <BOS>Lights Camera Action[Intro]\\nThe lights, ...\n",
289
- "4 <BOS>Thug Life [Souljah] (Original Version 1)[..."
290
- ]
291
- },
292
- "execution_count": 15,
293
- "metadata": {},
294
- "output_type": "execute_result"
295
- }
296
- ],
297
- "source": [
298
- "df_train = pd.DataFrame(List_train,columns = [\"Songs\"])\n",
299
- "df_train.head()"
300
- ]
301
- },
302
- {
303
- "cell_type": "code",
304
- "execution_count": 16,
305
- "metadata": {},
306
- "outputs": [
307
- {
308
- "data": {
309
- "text/html": [
310
- "<div>\n",
311
- "<style scoped>\n",
312
- " .dataframe tbody tr th:only-of-type {\n",
313
- " vertical-align: middle;\n",
314
- " }\n",
315
- "\n",
316
- " .dataframe tbody tr th {\n",
317
- " vertical-align: top;\n",
318
- " }\n",
319
- "\n",
320
- " .dataframe thead th {\n",
321
- " text-align: right;\n",
322
- " }\n",
323
- "</style>\n",
324
- "<table border=\"1\" class=\"dataframe\">\n",
325
- " <thead>\n",
326
- " <tr style=\"text-align: right;\">\n",
327
- " <th></th>\n",
328
- " <th>Songs</th>\n",
329
- " </tr>\n",
330
- " </thead>\n",
331
- " <tbody>\n",
332
- " <tr>\n",
333
- " <th>0</th>\n",
334
- " <td>&lt;BOS&gt;Letter 2 My Unborn[Intro]\\nTo my unborn c...</td>\n",
335
- " </tr>\n",
336
- " <tr>\n",
337
- " <th>1</th>\n",
338
- " <td>&lt;BOS&gt;Trouble[Intro]\\nTrouble on last, oh well\\...</td>\n",
339
- " </tr>\n",
340
- " <tr>\n",
341
- " <th>2</th>\n",
342
- " <td>&lt;BOS&gt;SouthsideSu woo\\nBitch I'm from the south...</td>\n",
343
- " </tr>\n",
344
- " <tr>\n",
345
- " <th>3</th>\n",
346
- " <td>&lt;BOS&gt;Gangsta PartyFeat. Lil B\\n[Lil Wayne]\\nI ...</td>\n",
347
- " </tr>\n",
348
- " <tr>\n",
349
- " <th>4</th>\n",
350
- " <td>&lt;BOS&gt;Gangstaz Life[Verse 1: Snoop Dogg]\\n10-20...</td>\n",
351
- " </tr>\n",
352
- " </tbody>\n",
353
- "</table>\n",
354
- "</div>"
355
- ],
356
- "text/plain": [
357
- " Songs\n",
358
- "0 <BOS>Letter 2 My Unborn[Intro]\\nTo my unborn c...\n",
359
- "1 <BOS>Trouble[Intro]\\nTrouble on last, oh well\\...\n",
360
- "2 <BOS>SouthsideSu woo\\nBitch I'm from the south...\n",
361
- "3 <BOS>Gangsta PartyFeat. Lil B\\n[Lil Wayne]\\nI ...\n",
362
- "4 <BOS>Gangstaz Life[Verse 1: Snoop Dogg]\\n10-20..."
363
- ]
364
- },
365
- "execution_count": 16,
366
- "metadata": {},
367
- "output_type": "execute_result"
368
- }
369
- ],
370
- "source": [
371
- "df_val = pd.DataFrame(List_val,columns = [\"Songs\"])\n",
372
- "df_val.head()"
373
- ]
374
- },
375
- {
376
- "cell_type": "code",
377
- "execution_count": 17,
378
- "metadata": {},
379
- "outputs": [],
380
- "source": [
381
- "df_train.to_csv(\"Train.tsv\",sep=\"\\t\",index = False)"
382
- ]
383
- },
384
- {
385
- "cell_type": "code",
386
- "execution_count": 18,
387
- "metadata": {},
388
- "outputs": [],
389
- "source": [
390
- "df_val.to_csv(\"Val.tsv\",sep=\"\\t\",index = False)"
391
- ]
392
- }
393
- ],
394
- "metadata": {
395
- "kernelspec": {
396
- "display_name": "Python 3",
397
- "language": "python",
398
- "name": "python3"
399
- },
400
- "language_info": {
401
- "codemirror_mode": {
402
- "name": "ipython",
403
- "version": 3
404
- },
405
- "file_extension": ".py",
406
- "mimetype": "text/x-python",
407
- "name": "python",
408
- "nbconvert_exporter": "python",
409
- "pygments_lexer": "ipython3",
410
- "version": "3.6.9"
411
- }
412
- },
413
- "nbformat": 4,
414
- "nbformat_minor": 5
415
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/Lilgpt.txt DELETED
@@ -1,8 +0,0 @@
1
- Lil pump
2
- Lil wayne
3
- Lil Durk
4
- Lil B
5
- Lil Uzi Vert
6
- Lil Baby
7
- Lil Reese
8
- Lil Boosie
 
 
 
 
 
 
 
 
 
data/MFDOOM.txt DELETED
File without changes
data/flowmasteri.txt DELETED
@@ -1,8 +0,0 @@
1
- The Notorious B.I.G.
2
- Big Pun
3
- Big L
4
- Nas
5
- 50 Cent
6
- Prodigy
7
- Action Bronson
8
- Ill Bill
 
 
 
 
 
 
 
 
 
data/wutang.txt DELETED
@@ -1,11 +0,0 @@
1
- Wu-Tang Clan
2
- Raekwon
3
- Ghostface Killah
4
- RZA
5
- GZA
6
- Ol' Dirty Bastard
7
- Method Man
8
- Inspectah Deck
9
- U-God
10
- Masta Killa
11
- Cappadonna
 
 
 
 
 
 
 
 
 
 
 
 
data/ye.txt DELETED
@@ -1 +0,0 @@
1
- Kanye West
 
 
data/zenske.txt DELETED
@@ -1,11 +0,0 @@
1
- Lauryn Hill
2
- Jean Grae
3
- Lil Kim
4
- Missy Elliot
5
- Rah Digga
6
- MC Lyte
7
- Remy Ma
8
- Missy Elliott
9
-
10
-
11
- Foxy Brown
 
 
 
 
 
 
 
 
 
 
 
 
genius.py DELETED
@@ -1,38 +0,0 @@
1
- import os
2
- from pathlib import Path
3
- from unicodedata import name
4
- import lyricsgenius
5
- import sys
6
- """
7
- the data folder contains txt files with rapper's names, the songs folder contains all of the songs from a single group of artists
8
- wutang.txt (10 members) - > wutang.txt 1 files with all of their songs.
9
- """
10
- ROOT_DIR = Path(os.path.dirname(os.path.abspath(__file__)))
11
- #TODO: mulithreaded implemetation
12
- class Genius:
13
- def __init__(self, client_access_token, timeout, retries, songs_foldername = 'songs'):
14
- self.songs_foldername = songs_foldername
15
- self._api_ = lyricsgenius.Genius(client_access_token, timeout=timeout, retries=retries)
16
- def scrape_artist(self, artist_name: str):
17
- #you can pass a max_songs (or smth like that) parameter here to stop downloading songs after a certain number
18
- artist = self._api_.search_artist(artist_name)
19
- print(f"stvaram file {artist.name.strip()}")
20
- f = open(Path(self.songs_foldername, f'{artist.name.strip()}.txt'), 'w')
21
- for song in artist.songs:
22
- f.write("\n" + '*'*50 + "\n")
23
- f.write(song.title)
24
- f.write(song.lyrics)
25
- f.close()
26
- print(f"done with {artist_name}")
27
-
28
- #it loads rapper's names from the filename and then downloads all of their songs
29
- filename = 'Lilgpt.txt'
30
- songs_folder = Path(ROOT_DIR, 'songs', filename[:-4])
31
- genius = Genius("you api key here :)", songs_foldername = songs_folder, timeout = 15, retries = 30)
32
- try:
33
- os.makedirs(songs_folder)
34
- except:
35
- pass #folder already exists irrelevant error tbh
36
- with open(Path(ROOT_DIR, 'data', filename)) as f:
37
- for rapper in [line.strip() for line in f.readlines()]:
38
- genius.scrape_artist(rapper)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
songs/Lilgpt.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Boosie Badazz.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Baby.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Durk.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Flip.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Peep.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Pump.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Reese.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Uzi Vert.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/Lilgpt/Lil Wayne.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/50 Cent.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/Action Bronson.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/Big L.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/Big Pun.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/ILL BILL.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/Nas.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/Prodigy of Mobb Deep.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/flowmasteri/The Notorious B.I.G..txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/lyricstotxt.py DELETED
@@ -1,21 +0,0 @@
1
- import os
2
- from pathlib import Path
3
- import sys
4
- foldername = sys.argv[1]
5
- """
6
- this script gives the text <bos> and <eos> tokens it could have all been one script but yeah
7
- the foldername is passed and an argument when calling the script
8
- """
9
- header = ['text']
10
- songsfile = open(foldername+'.txt', 'w', encoding='UTF8')
11
- for _,_, files in os.walk(foldername):
12
- for filename in files:
13
- print(filename)
14
- textsfile = open(Path(foldername, filename))
15
- texts = textsfile.read()
16
- texts = texts.split('*'*50)
17
- texts = texts[1:]
18
- for text in texts:
19
- text_with_tokens = f"<BOS>{text}<EOS>\n"
20
- #print(text_with_tokens)
21
- songsfile.write(text_with_tokens)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
songs/wutang.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Cappadonna.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/GZA.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Ghostface Killah.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Inspectah Deck.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Masta Killa.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Method Man.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Ol’ Dirty Bastard.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/RZA.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Raekwon.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/U-God.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/wutang/Wu-Tang Clan.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/ye.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/ye/Kanye West.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/zenske.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/zenske/Jean Grae.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/zenske/Lauryn Hill.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/zenske/Lil’ Kim.txt DELETED
The diff for this file is too large to render. See raw diff
 
songs/zenske/MC Lyte.txt DELETED
The diff for this file is too large to render. See raw diff