r - 是否有一个 R 函数来预处理整个 CSV 文件以进行情绪分析?
问题描述
我是 R 中情感分析的新手,我使用教科书“Text Mining with R: A Tidy Approach”作为预处理文本的主要参考,他们使用以下代码:
text <- c("Because I could not stop for Death -",
"He kindly stopped for me -",
"The Carriage held but just Ourselves -",
"and Immortality")
library(dplyr)
text_df <- data_frame(line = 1:4, text = text)
library(tidytext)
text_df %>%
unnest_tokens(word, text)
问题是,我有一个 344 行 14 列的 CSV 数据集,我想计算 6 列中包含的文本的情绪:
有没有办法(单独)预处理每个观察中包含的数据而无需应用上述代码?
提前感谢您的帮助和建议!
解决方案
推荐阅读
- reactjs - 升级到最新版本后反应本机应用程序的奇怪行为
- java - "
预期,使用 FTS 标记器时出现“结束”错误 - python - 使用 json_normalize 在列表中展平双重嵌套字典
- postgresql - 在 yaml 中为 ruby 编码 Azure postgres dbstring
- python - 我怎样才能在一定时间内抓住所有被禁止的成员?
- python - 使用熊猫计算日期之间的日期
- php - Laravel - Eloquent 模型不触发事件
- reactjs - 有没有办法使打字稿中的对象仅在使用道具时才有效?
- java - 如何从我的应用程序内部安装 apk?
- java - 将终端附加到不同的 Java 进程