Based on a slightly amended version of the regular expression used to classify news, and non-news in: “Exposure to ideologically diverse news and opinion on Facebook” by Bakshy, Messing, and Adamic. Science. 2015.
news_url_signals(urls)A tibble with input_id, input, soft_news and hard_news.
The two flags are independent; neither is a general news/non-news decision.
Amendment: sport rather than sports
URL containing any of the following words is classified as soft news: "sport|entertainment|arts|fashion|style|lifestyle|leisure|celeb|movie|music|gossip|food|travel|horoscope|weather|gadget" # nolint: line_length_linter.
URL containing any of following words is classified as hard news: "politi|usnews|world|national|state|elect|vote|govern|campaign|war|polic|econ|unemploy|racis|energy|abortion|educa|healthcare|immigration" # nolint: line_length_linter.
Note that it is based on patterns existing in a small set of domains. See paper for details.
if (FALSE) { # \dontrun{
news_url_signals("http://www.bbc.com/sport")
news_url_signals(c("http://www.bbc.com/sport", "http://www.washingtontimes.com/news/politics/"))
} # }