File size: 25,784 Bytes
a53f410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import os\n",
    "from easynmt import EasyNMT\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "URL_BASE = \"https://arxiv.org/pdf/\"\n",
    "PDF_PATH = 'PDF'\n",
    "TXT_PATH= 'TXT'\n",
    "CSV_PATH = 'CSV'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Get Data from TXT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_json('ARxiv/arxiv-metadata-oai-snapshot.json',lines=True, chunksize=2001,dtype={'id':'str'})\n",
    "df = None\n",
    "for i in data:\n",
    "    df = i \n",
    "    print(type(i))\n",
    "    break\n",
    "df = df[['id','title','abstract']]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for file in df['id']:\n",
    "    file_path = TXT_PATH+'/'+str(file)+'.pdf.txt'\n",
    "    if  os.path.isfile(file_path):\n",
    "        with open(file_path,'r',encoding='utf8') as f:\n",
    "            s =str( f.read()) \n",
    "            df.loc[df['id'] == str(file),'full_text'] = s          "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = df.dropna()\n",
    "df.reset_index()\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_en.csv',index=False,encoding='utf-8')\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# first run \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(CSV_PATH +'/scientific_paper_en.csv',dtype={'id':'str'})\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# leer datos"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(CSV_PATH +'/scientific_paper_full_text_translated.csv',dtype={'id':'str'})\n",
    "print(len(df.index))\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# translate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = EasyNMT('opus-mt')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## translate full text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "max = len(df.index)\n",
    "for i in range(0,1754):\n",
    "    text = df.iloc[i]['full_text']\n",
    "    translated_text = model.translate(text, target_lang='es')\n",
    "    df.loc[i,'translated'] = translated_text   \n",
    "    print(\"listo documento \",i)\n",
    "    if(i%10==0):\n",
    "        df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## translate abstract"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "max = len(df.index)\n",
    "for i in range(0,1754):\n",
    "    text = df.iloc[i]['abstract']\n",
    "    translated_text = model.translate(text, target_lang='es')\n",
    "    df.loc[i,'translated_abstract'] = translated_text   \n",
    "    print(\"listo documento \",i)\n",
    "    if(i%100==0):\n",
    "        df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# remove abstract"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "max = len(df.index)-1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "end = 'Introducción'\n",
    "for i in range(0,max):\n",
    "    text = df.iloc[i]['translated']    \n",
    "    p = text.find(end)\n",
    "    if(p != -1):        \n",
    "        df.loc[i,'translated_no_abstract'] = text[p:]   \n",
    "    else:\n",
    "        df.loc[i,'translated_no_abstract']= text\n",
    "    print(\"listo documento \",i,p)\n",
    "    if(i%1000==0):\n",
    "        df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "end = 'Abstract'\n",
    "for i in range(0,max):\n",
    "    text = df.iloc[i]['full_text']    \n",
    "    p = text.find(end)\n",
    "    if(p != -1):        \n",
    "        df.loc[i,'text_no_abstract'] = text[p:]   \n",
    "    else:\n",
    "        df.loc[i,'text_no_abstract']= text    \n",
    "    if(i%1000==0):\n",
    "        df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')\n",
    "df.to_csv(CSV_PATH+'/scientific_paper_full_text_translated.csv',index=False,encoding='utf-8')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# split data to csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(CSV_PATH +'/scientific_paper_full_text_translated.csv',dtype={'id':'str'})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "      <th>full_text</th>\n",
       "      <th>abstract</th>\n",
       "      <th>text_no_abstract</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0704.0002</td>\n",
       "      <td>Sparsity-certifying Graph Decompositions</td>\n",
       "      <td>Descomposiciones del gráfico de certificación ...</td>\n",
       "      <td>Describimos un nuevo algoritmo, el juego de ...</td>\n",
       "      <td>Introducción y preliminares\\nEl foco de este d...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0704.0003</td>\n",
       "      <td>The evolution of the Earth-Moon system based o...</td>\n",
       "      <td>La evolución del sistema Tierra-Luna basado en...</td>\n",
       "      <td>La evolución del sistema Tierra-Luna es desc...</td>\n",
       "      <td>Introducción \\nLa teoría aceptada popularmente...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0704.0004</td>\n",
       "      <td>A determinant of Stirling cycle numbers counts...</td>\n",
       "      <td>Un determinante de los números de ciclo de Sti...</td>\n",
       "      <td>Demostramos que un determinante de los númer...</td>\n",
       "      <td>Introducción El propósito principal de este ar...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0704.0005</td>\n",
       "      <td>From dyadic $\\Lambda_{\\alpha}$ to $\\Lambda_{\\a...</td>\n",
       "      <td>DE DÍA A DÍA\\nWAEL ABU-SHAMMALA Y ALBERTO TORC...</td>\n",
       "      <td>En este artículo mostramos cómo calcular la ...</td>\n",
       "      <td>DE DÍA A DÍA\\nWAEL ABU-SHAMMALA Y ALBERTO TORC...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0704.0007</td>\n",
       "      <td>Polymer Quantum Mechanics and its Continuum Limit</td>\n",
       "      <td>La mecánica cuántica de polímeros y su límite ...</td>\n",
       "      <td>Una representación cuántica no estándar de l...</td>\n",
       "      <td>La mecánica cuántica de polímeros y su límite ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1749</th>\n",
       "      <td>0704.1996</td>\n",
       "      <td>A Wave-function for Stringy Universes</td>\n",
       "      <td>LPTENS–07/16\\nAbril de 2007\\nUna función de on...</td>\n",
       "      <td>Definimos una función de onda para los fondo...</td>\n",
       "      <td>Introducción\\nNuestro objetivo en este documen...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1750</th>\n",
       "      <td>0704.1997</td>\n",
       "      <td>Query on Negative Temperature, Internal Intera...</td>\n",
       "      <td>Microsoft Word - negEntr.doc\\nConsulta sobre t...</td>\n",
       "      <td>Después de que la temperatura negativa se vu...</td>\n",
       "      <td>Microsoft Word - negEntr.doc\\nConsulta sobre t...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1751</th>\n",
       "      <td>0704.1998</td>\n",
       "      <td>Absence of the Fifth Force Problem in a Model ...</td>\n",
       "      <td>Ausencia del problema de la quinta fuerza en u...</td>\n",
       "      <td>Un modelo de escala invariante que contiene ...</td>\n",
       "      <td>Introducción\\n\\tBase de Dos Medidas Teoría de ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1752</th>\n",
       "      <td>0704.1999</td>\n",
       "      <td>Dark matter caustics and the enhancement of se...</td>\n",
       "      <td>Proyecto de versión 16 de noviembre de 2018\\nT...</td>\n",
       "      <td>Los haloes fríos de materia oscura están pob...</td>\n",
       "      <td>Proyecto de versión 16 de noviembre de 2018\\nT...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1753</th>\n",
       "      <td>0704.2000</td>\n",
       "      <td>Search for a Higgs boson produced in associati...</td>\n",
       "      <td>FERMILAB-PUB-07/076-E\\nBúsqueda de un bosón Hi...</td>\n",
       "      <td>Describimos una búsqueda para el modelo está...</td>\n",
       "      <td>FERMILAB-PUB-07/076-E\\nBúsqueda de un bosón Hi...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1754 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             id                                              title  \\\n",
       "0     0704.0002           Sparsity-certifying Graph Decompositions   \n",
       "1     0704.0003  The evolution of the Earth-Moon system based o...   \n",
       "2     0704.0004  A determinant of Stirling cycle numbers counts...   \n",
       "3     0704.0005  From dyadic $\\Lambda_{\\alpha}$ to $\\Lambda_{\\a...   \n",
       "4     0704.0007  Polymer Quantum Mechanics and its Continuum Limit   \n",
       "...         ...                                                ...   \n",
       "1749  0704.1996              A Wave-function for Stringy Universes   \n",
       "1750  0704.1997  Query on Negative Temperature, Internal Intera...   \n",
       "1751  0704.1998  Absence of the Fifth Force Problem in a Model ...   \n",
       "1752  0704.1999  Dark matter caustics and the enhancement of se...   \n",
       "1753  0704.2000  Search for a Higgs boson produced in associati...   \n",
       "\n",
       "                                              full_text  \\\n",
       "0     Descomposiciones del gráfico de certificación ...   \n",
       "1     La evolución del sistema Tierra-Luna basado en...   \n",
       "2     Un determinante de los números de ciclo de Sti...   \n",
       "3     DE DÍA A DÍA\\nWAEL ABU-SHAMMALA Y ALBERTO TORC...   \n",
       "4     La mecánica cuántica de polímeros y su límite ...   \n",
       "...                                                 ...   \n",
       "1749  LPTENS–07/16\\nAbril de 2007\\nUna función de on...   \n",
       "1750  Microsoft Word - negEntr.doc\\nConsulta sobre t...   \n",
       "1751  Ausencia del problema de la quinta fuerza en u...   \n",
       "1752  Proyecto de versión 16 de noviembre de 2018\\nT...   \n",
       "1753  FERMILAB-PUB-07/076-E\\nBúsqueda de un bosón Hi...   \n",
       "\n",
       "                                               abstract  \\\n",
       "0       Describimos un nuevo algoritmo, el juego de ...   \n",
       "1       La evolución del sistema Tierra-Luna es desc...   \n",
       "2       Demostramos que un determinante de los númer...   \n",
       "3       En este artículo mostramos cómo calcular la ...   \n",
       "4       Una representación cuántica no estándar de l...   \n",
       "...                                                 ...   \n",
       "1749    Definimos una función de onda para los fondo...   \n",
       "1750    Después de que la temperatura negativa se vu...   \n",
       "1751    Un modelo de escala invariante que contiene ...   \n",
       "1752    Los haloes fríos de materia oscura están pob...   \n",
       "1753    Describimos una búsqueda para el modelo está...   \n",
       "\n",
       "                                       text_no_abstract  \n",
       "0     Introducción y preliminares\\nEl foco de este d...  \n",
       "1     Introducción \\nLa teoría aceptada popularmente...  \n",
       "2     Introducción El propósito principal de este ar...  \n",
       "3     DE DÍA A DÍA\\nWAEL ABU-SHAMMALA Y ALBERTO TORC...  \n",
       "4     La mecánica cuántica de polímeros y su límite ...  \n",
       "...                                                 ...  \n",
       "1749  Introducción\\nNuestro objetivo en este documen...  \n",
       "1750  Microsoft Word - negEntr.doc\\nConsulta sobre t...  \n",
       "1751  Introducción\\n\\tBase de Dos Medidas Teoría de ...  \n",
       "1752  Proyecto de versión 16 de noviembre de 2018\\nT...  \n",
       "1753  FERMILAB-PUB-07/076-E\\nBúsqueda de un bosón Hi...  \n",
       "\n",
       "[1754 rows x 5 columns]"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "es = df[['id','title','translated','translated_abstract','translated_no_abstract']]\n",
    "es.columns = [\"id\",\"title\", \"full_text\",\"abstract\",\"text_no_abstract\"]\n",
    "es.to_csv(CSV_PATH+'/scientific_paper_es.csv',index=False,encoding='utf-8')\n",
    "es"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "      <th>full_text</th>\n",
       "      <th>abstract</th>\n",
       "      <th>text_no_abstract</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0704.0002</td>\n",
       "      <td>Sparsity-certifying Graph Decompositions</td>\n",
       "      <td>Sparsity-certifying Graph Decompositions\\nIlea...</td>\n",
       "      <td>We describe a new algorithm, the $(k,\\ell)$-...</td>\n",
       "      <td>Introduction and preliminaries\\nThe focus of t...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0704.0003</td>\n",
       "      <td>The evolution of the Earth-Moon system based o...</td>\n",
       "      <td>The evolution of the Earth-Moon system based o...</td>\n",
       "      <td>The evolution of Earth-Moon system is descri...</td>\n",
       "      <td>Introduction \\nThe popularly accepted theory f...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0704.0004</td>\n",
       "      <td>A determinant of Stirling cycle numbers counts...</td>\n",
       "      <td>A Determinant of Stirling Cycle Numbers Counts...</td>\n",
       "      <td>We show that a determinant of Stirling cycle...</td>\n",
       "      <td>Introduction The chief purpose of this paper i...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0704.0005</td>\n",
       "      <td>From dyadic $\\Lambda_{\\alpha}$ to $\\Lambda_{\\a...</td>\n",
       "      <td>FROM DYADIC Λα TO Λα\\nWAEL ABU-SHAMMALA AND AL...</td>\n",
       "      <td>In this paper we show how to compute the $\\L...</td>\n",
       "      <td>FROM DYADIC Λα TO Λα\\nWAEL ABU-SHAMMALA AND AL...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0704.0007</td>\n",
       "      <td>Polymer Quantum Mechanics and its Continuum Limit</td>\n",
       "      <td>Polymer Quantum Mechanics and its Continuum Li...</td>\n",
       "      <td>A rather non-standard quantum representation...</td>\n",
       "      <td>Polymer Quantum Mechanics and its Continuum Li...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1749</th>\n",
       "      <td>0704.1996</td>\n",
       "      <td>A Wave-function for Stringy Universes</td>\n",
       "      <td>LPTENS–07/16\\nApril 2007\\nA Wave-function for ...</td>\n",
       "      <td>We define a wave-function for string theory ...</td>\n",
       "      <td>Introduction\\nOur goal in this paper is to emb...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1750</th>\n",
       "      <td>0704.1997</td>\n",
       "      <td>Query on Negative Temperature, Internal Intera...</td>\n",
       "      <td>Microsoft Word - negEntr.doc\\nQuery on Negativ...</td>\n",
       "      <td>After negative temperature is restated, we f...</td>\n",
       "      <td>Microsoft Word - negEntr.doc\\nQuery on Negativ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1751</th>\n",
       "      <td>0704.1998</td>\n",
       "      <td>Absence of the Fifth Force Problem in a Model ...</td>\n",
       "      <td>Absence of the Fifth Force Problem in a Model ...</td>\n",
       "      <td>A scale invariant model containing dilaton $...</td>\n",
       "      <td>Introduction\\n\\tBasis of Two Measures Field Th...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1752</th>\n",
       "      <td>0704.1999</td>\n",
       "      <td>Dark matter caustics and the enhancement of se...</td>\n",
       "      <td>Draft version November 16, 2018\\nPreprint type...</td>\n",
       "      <td>Cold dark matter haloes are populated by cau...</td>\n",
       "      <td>Draft version November 16, 2018\\nPreprint type...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1753</th>\n",
       "      <td>0704.2000</td>\n",
       "      <td>Search for a Higgs boson produced in associati...</td>\n",
       "      <td>FERMILAB-PUB-07/076-E\\nSearch for a Higgs boso...</td>\n",
       "      <td>We describe a search for the standard model ...</td>\n",
       "      <td>FERMILAB-PUB-07/076-E\\nSearch for a Higgs boso...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1754 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             id                                              title  \\\n",
       "0     0704.0002           Sparsity-certifying Graph Decompositions   \n",
       "1     0704.0003  The evolution of the Earth-Moon system based o...   \n",
       "2     0704.0004  A determinant of Stirling cycle numbers counts...   \n",
       "3     0704.0005  From dyadic $\\Lambda_{\\alpha}$ to $\\Lambda_{\\a...   \n",
       "4     0704.0007  Polymer Quantum Mechanics and its Continuum Limit   \n",
       "...         ...                                                ...   \n",
       "1749  0704.1996              A Wave-function for Stringy Universes   \n",
       "1750  0704.1997  Query on Negative Temperature, Internal Intera...   \n",
       "1751  0704.1998  Absence of the Fifth Force Problem in a Model ...   \n",
       "1752  0704.1999  Dark matter caustics and the enhancement of se...   \n",
       "1753  0704.2000  Search for a Higgs boson produced in associati...   \n",
       "\n",
       "                                              full_text  \\\n",
       "0     Sparsity-certifying Graph Decompositions\\nIlea...   \n",
       "1     The evolution of the Earth-Moon system based o...   \n",
       "2     A Determinant of Stirling Cycle Numbers Counts...   \n",
       "3     FROM DYADIC Λα TO Λα\\nWAEL ABU-SHAMMALA AND AL...   \n",
       "4     Polymer Quantum Mechanics and its Continuum Li...   \n",
       "...                                                 ...   \n",
       "1749  LPTENS–07/16\\nApril 2007\\nA Wave-function for ...   \n",
       "1750  Microsoft Word - negEntr.doc\\nQuery on Negativ...   \n",
       "1751  Absence of the Fifth Force Problem in a Model ...   \n",
       "1752  Draft version November 16, 2018\\nPreprint type...   \n",
       "1753  FERMILAB-PUB-07/076-E\\nSearch for a Higgs boso...   \n",
       "\n",
       "                                               abstract  \\\n",
       "0       We describe a new algorithm, the $(k,\\ell)$-...   \n",
       "1       The evolution of Earth-Moon system is descri...   \n",
       "2       We show that a determinant of Stirling cycle...   \n",
       "3       In this paper we show how to compute the $\\L...   \n",
       "4       A rather non-standard quantum representation...   \n",
       "...                                                 ...   \n",
       "1749    We define a wave-function for string theory ...   \n",
       "1750    After negative temperature is restated, we f...   \n",
       "1751    A scale invariant model containing dilaton $...   \n",
       "1752    Cold dark matter haloes are populated by cau...   \n",
       "1753    We describe a search for the standard model ...   \n",
       "\n",
       "                                       text_no_abstract  \n",
       "0     Introduction and preliminaries\\nThe focus of t...  \n",
       "1     Introduction \\nThe popularly accepted theory f...  \n",
       "2     Introduction The chief purpose of this paper i...  \n",
       "3     FROM DYADIC Λα TO Λα\\nWAEL ABU-SHAMMALA AND AL...  \n",
       "4     Polymer Quantum Mechanics and its Continuum Li...  \n",
       "...                                                 ...  \n",
       "1749  Introduction\\nOur goal in this paper is to emb...  \n",
       "1750  Microsoft Word - negEntr.doc\\nQuery on Negativ...  \n",
       "1751  Introduction\\n\\tBasis of Two Measures Field Th...  \n",
       "1752  Draft version November 16, 2018\\nPreprint type...  \n",
       "1753  FERMILAB-PUB-07/076-E\\nSearch for a Higgs boso...  \n",
       "\n",
       "[1754 rows x 5 columns]"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "en = df[['id','title','full_text','abstract','text_no_abstract']]\n",
    "en.columns = [\"id\",\"title\", \"full_text\",\"abstract\",\"text_no_abstract\"]\n",
    "en.to_csv(CSV_PATH+'/scientific_paper_en.csv',index=False,encoding='utf-8')\n",
    "en"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "05def4d9d0834781cbeb6b95fd92421f8bd6a45e945308f90d88567f4afc1911"
  },
  "kernelspec": {
   "display_name": "Python 3.8.12 ('tensorflow')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}