不知道為什么自定義詞云一直出不了圖

這個是整理的詞和詞頻
下面的是陳述句
worker() -> wk
fristmone %>%
mutate(words = map(fristmone[,3],segment,jieba = wk)) %>%
select(words) -> corpus
fristmone %>%
mutate(words = map(fristmone[,7],segment,jieba = wk)) %>%
select(words) -> corpu
corpus<-rbind(corpus,corpu)
corpus %>%
mutate(id = 1:n()) -> corpus
corpus %>%
unnest(words) %>%
count(id,words) -> f_table
f_table %>%
bind_tf_idf(term = words,document = id,n = n) -> tf_idf_table
tf_idf_table<-sqldf('select * from tf_idf_table where length(words) >1')
tf_idf_table %>%
group_by(id) %>%
top_n(2,tf_idf) %>%
ungroup() -> top3
p_load(wordcloud2)
top3 %>%
count(words) %>%
top_n(100) %>%
ungroup()->top3
#只顯示出現次數最多的100個關鍵詞
top3<-as.data.frame(top3)
letterCloud(data=https://bbs.csdn.net/topics/top3,word = "blibli",size=3,backgroundColor="white")
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/231662.html
標籤:其他技術專區
上一篇:zemax19中文手冊
