其他分享
首页 > 其他分享> > R语言文本分析

R语言文本分析

作者:互联网

R code来源于政府报告词云图[1]

分析的网络文本来源于政府工作报告(文字实录)[2]

R语言分析如下:

library(jiebaR)
library(tidyverse)
library(rvest)
library(wordcloud2)

url <- "http://www.gov.cn/premier/2020-05/22/content_5513757.htm"
text <- url %>%
  read_html(encoding="utf-8") %>%
  html_nodes("div.pages_content") %>%
  html_text()

stopwords_CN <- c("被","怎么","还是","多少","得", "吗","给",
                  "年","月","还","个","能", "日","什么","做","没","啊",
                  "的", "了", "在", "是", "我", "有", "和", "就","不",
                  "人", "都", "一", "一个", "上", "也", "很", "到", "说",
                  "要", "去", "你","会", "着", 

标签:分析,语言,library,来源于,html,文本
来源: https://blog.csdn.net/Mrrunsen/article/details/123102111