DOI: 10.7910/dvn/8nmd1u
title: One million articles from five post socialist countries with extracted features: sentiment, basic emotions, LDA topics and presence of influential domestic politicians

description: This is a replication data for my paper under blind review. &lt;br&gt;&lt;br&gt;
Abstract
This paper develops a new prediction model for media content presence on a website. It analyses a new corpus of one million articles from five countries: Poland, Russia, Belarus, Kazakhstan and Ukraine, in two languages, Polish and Russian. These articles were scraped daily from seventeen websites in 2017-2020 period. The research applies a wide range of natural language processing methods to automatically derive several properties of each article: its topic, sentiment, basic emotions, mentions of influential domestic politicians. The articles’ embeddings and their cosine similarity are used to calculate the news context, such as how an article differs from the daily issue main themes. These features are used to estimate a logistic regression assessing the likelihood that the same or slightly modified, as measured by cosine similarity, article will remain on the main web page the next day. The key, and somewhat unexpected result is that articles with negative sentiment polarity are less likely to be published for more than one day. This result holds for all countries analyzed. It means that the negative news bias documented in the literature is partly offset by their shorter life cycle.&lt;br&gt;&lt;br&gt;

Data is in the Python pickle format. Should be read into Python using the pickle.load() function. Each element (row) is the data frames or list represents one news article.
Each file has the same format. Loading a pickle file returns a list of four elements:&lt;br&gt;
1. A dummy variable equal to 1 when the article was published the next day, with the text being identical&lt;br&gt;
2. A dummy variable equal to 1 when the article was published the next day, but we allow for small text modifications (cosine similarity &gt; 0.99)&lt;br&gt;
3. Dataframe with extracted features, described below.&lt;br&gt;
4. List with texts of articles in Polish or Russian&lt;br&gt;&lt;br&gt;
 
Ad 3. The columns of the dataframe are as follows (we refer to row number i in description):&lt;br&gt;
- pandas index (may appear once or twice in the datafame)&lt;br&gt;
- maxcosine: maximum cosine similarity between art i and all articles published next day&lt;br&gt;
- cosine_diff: cosine similarity between article i and the elementwise average of embeddings of all articles in the current issue. Measure how similar is the article i to the core narrative of the current issue&lt;br&gt;
- cosine_std: std. dev. of cosine similarity measures between all pairs of articles in the current issue. Measures how focused or dispersed is the current issue news coverage&lt;br&gt;
- thirteen LDA topic groups: politics, legislation and legal affairs (POL); economy, finance, various sectors of the economy (ECO); military, war, protests, crime, security threats (MIL); international affairs, specific issues concerning foreign countries (INT); technology (TECH); family issues, culture, sport, education (FAM); regional issues and housing (REG); health issues and the Covid-19 pandemic (HEA); media (MED); accidents (ACC); religion (REL); the Soviet Union (USSR); and articles for which no topic could be determined (MISC). &lt;br&gt;
- rsent.c: relative sentiment that is dictionary based sentiment of articles i minus the average sentiment of the newspaper. This approach eliminates newspaper or country idiosyncratic sentiment factors. c stands for Covid, the sentiment lexicon was augmented with Covid related terms &lt;br&gt;
- dip_*: Variable measuring if influential domestic politicians are mentioned in article i, * represent a country acronym. If N is equal to the number of occurrences of the names of influential domestic politicians in the article i, dip_* = 0 if N=0, dip_* = 1+ log(N) if N&gt;0. &lt;br&gt;
- three or four names of news portals from which the data was scraped.&lt;br&gt;
- names of six basic emotions and the article i emotion scores calculated using zero-shot learning and the large version of the XLM (Conneau et al., 2019) model from the huggingface transformers library available at https://huggingface.co/vicgalle/xlm-roberta-large-xnli-anli &lt;br&gt;

Names of the politicians used to calculate dip variables&lt;br&gt;
Russia&lt;br&gt;
 "putin" "medvedev" "vaino" "shoigu" "bortnikov" "lavrov" "mishustin" "kirienko" "sechin" &lt;br&gt;

Ukraine&lt;br&gt;
"zelensky" "shmygal" "akhmetov" "avakov" "ermak" "poroshenko" "medvedchuk" "groisman" &lt;br&gt;

Kazakhstan&lt;br&gt;
"sagyntaev" "mamin" "tokayev" "nnazarbayev" "dnazarbayeva" "kulibayev" "masimov"
&lt;br&gt;
Belarus&lt;br&gt;
 "alukashenko" "vakulchik" "vlukashenko" "kobyakov" "makei" "myasnikovich" [37] "rumas" "golovchenko" &lt;br&gt;

Poland&lt;br&gt;
"kaczynski" "duda" "morawiecki" "ziobro" &lt;br&gt;

Data coverage&lt;br&gt;
Country, news portal, numbr of articles&lt;br&gt;
Russia iz.ru 43,782&lt;br&gt;
Russia kommersant.ru 46,070&lt;br&gt;
Russia novayagazeta.ru 29,357&lt;br&gt;
Russia vedomosti.ru 27,797&lt;br&gt;
Kazakhstan informburo.kz 29,375&lt;br&gt;
Kazakhstan nur.kz 67,350&lt;br&gt;
Kazakhstan tengrinews.kz 44,285&lt;br&gt;
Kazakhstan zakon.kz 109,442&lt;br&gt;
Belarus bdg.by 33,447&lt;br&gt;
Belarus belgazeta.by 21,995&lt;br&gt;
Belarus sb.by 83,685&lt;br&gt;
Ukraine kp.ua 194,792&lt;br&gt;
Ukraine segodnya.ua 45,835&lt;br&gt;
Ukraine vesti.ua 90,559&lt;br&gt;
Poland gazeta.pl 53,321&lt;br&gt;
Poland rp.pl 49,587&lt;br&gt;
Poland wpolityce.pl 76,625&lt;br&gt;&lt;br&gt;

In the provided dataframes the number of observations is smaller, because the issues for which there was no next day issue, were removed. &lt;br&gt;&lt;br&gt;

Data was scraped daily between 2017 or 2018 (depending on the country) and January 2021.&lt;br&gt;