开始使用免费开始使用

创建主题模型

主题建模是一种从海量文本中自动发现主题的任务。

您可以基于推文文本创建主题模型,把海量信息快速归纳为不同主题,从而获得洞见。

在本练习中,您将从关于 "Climate change" 的推文中提取不同的主题。

关于 "Climate change" 的推文的 DTM 已预加载为 dtm_climate_new

本练习已预加载库 topicmodels

本练习是课程的一部分

用 R 分析社交媒体数据

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Create a topic model with 5 topics
topicmodl_5 <- ___(dtm_climate_new, k = ___)

# Select and view the top 10 terms in the topic model
top_10terms <- ___(topicmodl_5, ___)
top_10terms 
编辑并运行代码