【发布时间】:2023-03-08 23:35:01
【问题描述】:
我对 NLP 很陌生。我的问题是我可以使用 NLP 将相同含义的单词组合成一个,例如,考虑以下行;
1. It’s too noisy here
2. Come on people whats up with all the chatter
3. Why are people shouting like crazy
4. Shut up people, why are you making so much noise
大家可以注意到,这里的共同点是人们都在抱怨噪音。
noisy, chatter, shouting, noise -> Noise
是否可以使用 NLP 使用通用实体对单词进行分组。我正在使用 R 来解决这个问题。
我使用了一个示例 twitter 数据集,我的预期输出将是一个包含以下内容的表格;
Noise
It’s too noisy here
Come on people whats up with all the chatter
Why are people shouting like crazy
Shut up people, why are you making so much noise
在此处发布之前,我确实搜索了网络以供参考。任何建议或有价值的意见都会有很大帮助。
谢谢
【问题讨论】:
-
数据格式是什么样的?它是一个列表,json....请提供一个例子。
-
@Andre Elrico,数据为 CSV 格式。
-
grepl函数是你的朋友,模式为"noisy|chatter|shouting|noise" -
#regularExpressions