[论文解读] pysentimiento: A Python Toolkit for Opinion Mining and Social NLP tasks
pysentimiento 是一个多语言 Python 工具包,提供针对情感、情绪、仇恨言论和讽刺分析的最先进模型,覆盖西班牙语、英语、意大利语和葡萄牙语,并附有基准结果与公平性评估。
In recent years, the extraction of opinions and information from user-generated text has attracted a lot of interest, largely due to the unprecedented volume of content in Social Media. However, social researchers face some issues in adopting cutting-edge tools for these tasks, as they are usually behind commercial APIs, unavailable for other languages than English, or very complex to use for non-experts. To address these issues, we present pysentimiento, a comprehensive multilingual Python toolkit designed for opinion mining and other Social NLP tasks. This open-source library brings state-of-the-art models for Spanish, English, Italian, and Portuguese in an easy-to-use Python library, allowing researchers to leverage these techniques. We present a comprehensive assessment of performance for several pre-trained language models across a variety of tasks, languages, and datasets, including an evaluation of fairness in the results.
研究动机与目标
- 提供一个开源的多语言工具包,用于在 Python 中进行西班牙语、英语、葡萄牙语和意大利语的观点挖掘与社会 NLP 任务。
- 在多语言、多任务上对最先进模型的性能进行基准评估。
- 为英语情绪分析提供公平性评估及偏见诊断指南。
- 通过集成到库中的 HuggingFace hub 公开发布性能最佳的模型。
- 为在 pysentimiento 内扩展语言和任务奠定基础。
提出的方法
- 对每种语言/任务在代表性数据集上微调多种预训练语言模型。
- 使用 Twitter 专用归一化规则对嘈杂的社交媒体文本进行预处理。
- 使用 Macro F1 在十次不同种子下评估模型。
- 基于验证性能为每种语言/任务选择表现最佳的模型。
- 使用 Equity Evaluation Corpus 和统计平等度指标对英语情绪分析进行公平性评估。
- 提供开源实现以及代码和模型的仓库链接。
实验结果
研究问题
- RQ1哪种预训练语言模型最适合在西班牙语、英语、意大利语和葡萄牙语中进行情感、情绪、仇恨言论和讽刺检测?
- RQ2专业化的社交媒体模型在多语言观点挖掘任务中相比通用领域模型有何差异?
- RQ3在以人口统计平衡语料库的英语情绪分析模型中,公平性/偏见的概况如何?
- RQ4pysentimiento 如何促进社会 NLP 任务的可重复基准测试和公平评估?
主要发现
- 专业化社交媒体模型(如 BERTweet、RoBERTuito、BERTabaporu)通常在大多数语言和任务中优于通用领域模型。
- RoBERTuito 和西班牙语微调模型通常在各任务上表现稳健;意大利语最佳模型是 BERTit,而葡萄牙语方面,BERTweet BR 和 BERTabaporu 显示出强劲结果。
- 表 3 显示跨语言和任务的 Macro F1 分数,RoBERTuito 与 BERTweet 变体常常达到最佳性能;葡萄牙语结果包括模型 BERT pt、BERTweet BR、RoBERTuito 和 BERTabaporu。
- 对英语情绪检测使用 ECC 语料库的公平性分析表明,在评估的模型-任务组合下,未发现不良影响的证据,符合统计平等性。
- 作者在 GitHub 和 HuggingFace hub 上公开了模型与代码,便于研究者重复使用。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。