利用Transformer分析虚假新闻
在当今的社交媒体环境中,虚假新闻和不同观点的激烈交锋屡见不鲜。本文将介绍如何利用Transformer模型对社交媒体上的消息进行分析,包括情感分析、命名实体识别(NER)和语义角色标注(SRL)等任务,以帮助我们更好地理解和应对虚假新闻。
情感分析
在社交媒体上,各方观点的争论十分激烈。我们选取了支持持枪和主张控枪的两条消息进行情感分析。
支持持枪的推文分析 :
- 推文内容:“Afirst78: I have had rifles and guns for years and never had a problem. I raised my kids right so they have guns too and never hurt anything except rabbits.”
- 运行分析代码:
!echo '{"sentence": "I have had rifles and guns for years and never had a problem. I raised my kids right so they have guns too and never hurt anything except rabbits."}' | \
allennlp predict https://storage.googleapis.com/allennlp-public-models/sst-roberta-large-2020.06.08.tar.gz -
超级会员免费看
订阅专栏 解锁全文
7205

被折叠的 条评论
为什么被折叠?



