get_ECB_speeches: Download and pre-process speeches from the European Central...

View source: R/others.R

get_ECB_speechesR Documentation

Download and pre-process speeches from the European Central Bank

Description

This helper function automatically retrieve the full data set of speeches made available by the ECB. In addition, it implements a number of pre-processing steps that may be turned on or off as needed.

Usage

get_ECB_speeches(
  filter_english = TRUE,
  clean_footnotes = TRUE,
  compute_sentiment = TRUE,
  tokenize_w_POS = FALSE
)

Arguments

filter_english

if TRUE, attempts to select English speeches only using textcat::textcat().

clean_footnotes

if TRUE, attempts to clean footnotes from speeches texts using some regex patterns.

compute_sentiment

if TRUE, computes the sentiment of each speech using sentometrics::compute_sentiment() with the the Loughran & McDonald lexicon.

tokenize_w_POS

if TRUE, tokenizes and apply Part-Of-Speech tagging with spacyr::spacy_parse(). Nouns, adjectives and proper nouns are then extracted from the parsed speeches to form a tokens object.

Value

Depending on the arguments, returns either a data.frame or a quanteda::tokens object containing speeches of the ECB.


sentopics documentation built on May 31, 2023, 8:26 p.m.