eckendoerffer commited on
Commit
b50d362
1 Parent(s): eaee53a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +99 -0
README.md CHANGED
@@ -1,3 +1,102 @@
1
  ---
2
  license: cc-by-3.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-3.0
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - fr
7
+ tags:
8
+ - news
9
+ - media
10
+ - Press
11
+ size_categories:
12
+ - 100K<n<1M
13
  ---
14
+ # NEWS FR
15
+
16
+ ## Dataset
17
+
18
+ ### Format
19
+
20
+ - **Type**: Text
21
+ - **File Extension**: `.txt`
22
+
23
+ ### Structure
24
+
25
+ The dataset is divided into the following splits:
26
+
27
+ - `train.txt`: 1.04 GB - 548,000 rows - 90%
28
+ - `test.txt` : 56 MB - 30,445 rows - 5%
29
+ - `valid.txt`: 56 MB - 30,445 rows - 5%
30
+
31
+ ### Exploring the Dataset
32
+
33
+ You can use the `explore_dataset.py` script to explore the dataset by randomly displaying a certain number of lines from it. The script creates and saves an index based on the line breaks, enabling faster data retrieval and display.
34
+
35
+ ### Additional Information
36
+
37
+ This dataset is a subset of a larger 10GB French dataset, which also contains several thousand books and theses in French, Wikipedia, as well as several hundred thousand Francophone news articles.
38
+
39
+ ## EXTRACT NEWS FR
40
+
41
+ The "NEWS FR" module allows for the extraction of online press articles from over a hundred different sources.
42
+
43
+ ### Installation
44
+
45
+ To set up the module, follow the steps below:
46
+
47
+ 1. **Database Setup**:
48
+ - Create a database and incorporate the two tables present in `database.sql`.
49
+
50
+ 2. **Database Configuration**:
51
+ - Update your MySQL connection information in the `functions_mysqli.php` file.
52
+
53
+ 3. **Dependencies Installation**:
54
+ - The script requires the installation of `electrolinux/phpquery`. Install it using composer:
55
+ ```
56
+ composer require electrolinux/phpquery
57
+ ```
58
+ * Note:
59
+ * RSS feed links for media sources, as well as the HTML structure of media pages, tend to change
60
+ * and evolve regularly. It's crucial to regularly check the output per media source and adjust
61
+ * the parsing process to ensure high-quality text extraction and to address potential changes
62
+ * in RSS feed URLs.
63
+
64
+ ### Usage
65
+
66
+ #### 1. 1_extract_rss.php:
67
+
68
+ This script fetches RSS feeds from various media outlets and adds URLs for further extraction.
69
+
70
+ ```bash
71
+ php 1_extract_rss.php
72
+ ```
73
+
74
+ #### 2. 2_extract_news.php:
75
+
76
+ This script retrieves the sources of articles for subsequent local processing.
77
+
78
+ ```bash
79
+ php 2_extract_news.php
80
+ ```
81
+
82
+ #### 3. 3_extract_news_txt.php:
83
+
84
+ This script extracts the text content of press articles and saves it (title + description + text) to a `.txt` file.
85
+
86
+ ```bash
87
+ php 3_extract_news_txt.php
88
+ ```
89
+ After completing this step, you can use the Python script located at /dataset/2_cleaning_txt.py to standardize the text for your dataset.
90
+
91
+ #### 4. 4_extract_news_url.php:
92
+
93
+ This script allows for the extraction of links to other articles from local article sources. This ensures swift retrieval of numerous past articles, as opposed to fetching only the most recent ones.
94
+
95
+ ```bash
96
+ php 4_extract_news_url.php
97
+ ```
98
+ After using this script, you'll need to run 2_extract_news.php again to retrieve the sources of the new articles, as well as 3_extract_news_txt.php to extract the text from these articles.
99
+
100
+ ---
101
+
102
+ PHP + MySQL was chosen for this section to facilitate debugging, and to allow display by source or by media.