## 3 Crafting a Spanish Fake News Dataset
### Developing a Custom Dataset for Spanish Politics-Related Fake News
#### 3.2.4 Altering Real News to Generate Fake News  
With the aim of further expanding the set of fake news within our synthetic corpus and, simultaneously, balancing both categories, we have chosen to modify certain data in the genuine news collected through the methods described in the preceding sections. Our intention is to change the names of political parties, political leaders, locations, and even numerical values in real news to make them appear fictitious, carefully supervising the resulting news items to ensure they are indeed fake.  
* Locations such as cities, provinces, and countries, along with the names of political leaders, were identified using the spaCy library in conjunction with a publicly available pre-trained model specifically designed for named entity recognition (NER) tasks [49]. This powerful NER model enabled the accurate identification and classification of named entities within text, focusing on detecting and categorizing places and individuals. In our case, this approach played a crucial role in distinguishing regions, cities, and political figures in real news articles, allowing us to substitute these entities with names of the same category to generate corresponding fake news. Some examples are illustrated in Table 2. Given that the names used in this process were of Spanish origin, we employed the _es_core_news_lg_[50] model, tailored specifically for this language. In this way, we bypassed the need for other models, such as BERT for NER tasks; having been trained in English, these did not perform adequately in identifying the names of cities and even politicians originating from specific regions of Spain, such as Catalonia or Galicia.  
* The names of political parties have been manually compiled in a list, located within the real news, and replaced with other options in the fake news generated from the originals, as shown in Table 2.
* Numerical values have been identified with the assistance of the _Re_ library [51], which enables the detection of patterns within text. Once these patterns and the values to be altered have been located, they are replaced with other random values within a coherent range, depending on the type of data to be modified (percentage, year, etc.).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Altered Data** & **True News** & **False News** \\ \hline \multirow{3}{*}{Places} & “**Catalonia** prepares for regional elections & “**Asturias** prepares for regional elections \\  & amid a pandemic and political crisis & amid a pandemic and political crisis \\  & (February 2021).” & \\ \multirow{3}{*}{Political leaders} & “**[PERSON]**\&en**en** announces the extension \\  & of permanent ERTEs until May 2021 & permanent ERTEs until May 2021 \\  & (January 2021).” & \\ \multirow{3}{*}{Political parties} & “**Podems** defended the right to housing & “**Partido Popular** defended the right to \\  & against speculation (March 2020).” & housing against speculation (March 2020).” \\ \multirow{3}{*}{Numeric values} & “The unemployment rate in Spain drops to & “The unemployment rate in Spain drops to \\  & **15.3\%** in the second quarter of 2021 & **5.3\%** in the second quarter of 2021 \\ \cline{1-1}  & (July 2021).” & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Examples of fake news created by manipulating various types of data within genuine political news articles.  
Figure 3: Using the OpenAI API to craft fictional political news articles in the Spanish language.  
By following the four procedures explained from Sections 3.2.1-3.2.4, a total of 57,231 news articles were collected, resulting in a balanced corpus with 52% of true news and 48% of fake news. This dataset can be downloaded from [[https://www.kaggle.com/datasets/javieroterovizoso/spanish-political-fake-news](https://www.kaggle.com/datasets/javieroterovizoso/spanish-political-fake-news)]([https://www.kaggle.com/datasets/javieroterovizoso/spanish-political-fake-news](https://www.kaggle.com/datasets/javieroterovizoso/spanish-political-fake-news)) (accessed on 1 October 2024).