<jupyter_start><jupyter_text>News feed tag cloud<jupyter_code>library(readr)
library(dplyr)
library(stringr)
library(wordcloud)
library(tidytext)


library(tidyRSS)<jupyter_output><empty_output><jupyter_text>I'm using a Portuguese list. If you want to analyze english feeds, just change next cell to:```data("stop_words")```<jupyter_code>stopwords <- read_csv('portuguese-stopwords.txt', col_names = 'word')<jupyter_output>Parsed with column specification:
cols(
  word = col_character()
)<jupyter_text>Change the urls for your favorite news feed providers...<jupyter_code>feed <- tidyfeed("http://feed1")
feed2 <- tidyfeed("http://feed2")
#feed3 <- tidyfeed("https://<feed3")
#feed4 <- tidyfeed("https://<feed4>")
feedall <- bind_rows(feed,feed2)<jupyter_output><empty_output><jupyter_text>If you want to analyze english feeds, change the following cell to:```rss_t %    unnest_tokens(word,item_title) %>%    anti_join(stop_words,by="word") ```<jupyter_code>rss_t <- feedall %>%
    unnest_tokens(word,item_title) %>%
    anti_join(stopwords,by="word") 

words = rss_t %>% 
    group_by(word) %>% 
    summarise(freq = n()) %>% 
    arrange(desc(freq)) 

words = as.data.frame(words)

rownames(words) = words$word

library(wordcloud)
options(warn=-1)
wordcloud(words$word,words$freq,scale=c(8,.02),min.freq=3,max.words=Inf,colors=brewer.pal(8,"Dark2"))
options(warn=0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16225875625446748, 'fraction_numerical': 0.01143674052894925, 'mean_word_length': 7.235294117647059, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '479606', 'license': 'Apache-2.0', 'n_tokens_mistral': 542, 'n_tokens_neox': 506, 'n_words': 83, 'path': 'nlp/tagCloud/NewsCloud.ipynb', 'repo_name': 'rlo1977/datascience', 'size': '1399'}