🚀 基於方面的情感分析模型
本模型由 PyABSA 驅動,是一個用於基於方面的情感分析的開源工具。該模型使用 30k+ 的基於方面的情感分析(ABSA)樣本進行訓練,詳情見 ABSADatasets。測試集未包含在預訓練中,因此你可以使用此模型在常見的 ABSA 數據集(如 Laptop14、Rest14 數據集)上進行訓練和基準測試(Rest15 數據集除外!)
🚀 快速開始
模型信息
屬性 |
詳情 |
標籤 |
基於方面的情感分析、PyABSA |
許可證 |
MIT |
數據集 |
Laptop14、Restaurant14、Restaurant16、ACL - Twitter、MAMS、Television、TShirt、Yelp |
評估指標 |
準確率、宏 F1 值 |
示例文本 |
[CLS] when tables opened up, the manager sat another party before us. [SEP] manager [SEP] |
模型使用
from transformers import AutoTokenizer, AutoModelForSequenceClassification
# 加載 ABSA 模型和分詞器
model_name = "yangheng/deberta-v3-base-absa-v1.1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
for aspect in ['camera', 'phone']:
print(aspect, classifier('The camera quality of this phone is amazing.', text_pair=aspect))
✨ 主要特性
- 本模型是用於基於方面的情感分析的
deberta - v3 - base - absa
模型,使用來自 ABSADatasets 的英文數據集進行訓練。
- 該模型基於
microsoft/deberta-v3-base
和 FAST - LCF - BERT 模型進行訓練,相關代碼來自 PyABSA。
📚 詳細文檔
訓練模型
此模型基於 microsoft/deberta-v3-base
和 FAST - LCF - BERT 模型進行訓練,相關代碼來自 PyABSA。若要跟蹤最先進的模型,請參閱 PyASBA。
PyASBA 中的示例
示例展示瞭如何在 PyASBA 數據集中使用 FAST - LCF - BERT。
數據集
該模型使用 180k 個 ABSA 數據集示例(包括增強數據)進行微調。訓練數據集文件如下:
loading: integrated_datasets/apc_datasets/SemEval/laptop14/Laptops_Train.xml.seg
loading: integrated_datasets/apc_datasets/SemEval/restaurant14/Restaurants_Train.xml.seg
loading: integrated_datasets/apc_datasets/SemEval/restaurant16/restaurant_train.raw
loading: integrated_datasets/apc_datasets/ACL_Twitter/acl-14-short-data/train.raw
loading: integrated_datasets/apc_datasets/MAMS/train.xml.dat
loading: integrated_datasets/apc_datasets/Television/Television_Train.xml.seg
loading: integrated_datasets/apc_datasets/TShirt/Menstshirt_Train.xml.seg
loading: integrated_datasets/apc_datasets/Yelp/yelp.train.txt
引用
如果你在研究中使用此模型,請引用我們的論文:
@inproceedings{DBLP:conf/cikm/0008ZL23,
author = {Heng Yang and
Chen Zhang and
Ke Li},
editor = {Ingo Frommholz and
Frank Hopfgartner and
Mark Lee and
Michael Oakes and
Mounia Lalmas and
Min Zhang and
Rodrygo L. T. Santos},
title = {PyABSA: {A} Modularized Framework for Reproducible Aspect-based Sentiment
Analysis},
booktitle = {Proceedings of the 32nd {ACM} International Conference on Information
and Knowledge Management, {CIKM} 2023, Birmingham, United Kingdom,
October 21-25, 2023},
pages = {5117--5122},
publisher = {{ACM}},
year = {2023},
url = {https://doi.org/10.1145/3583780.3614752},
doi = {10.1145/3583780.3614752},
timestamp = {Thu, 23 Nov 2023 13:25:05 +0100},
biburl = {https://dblp.org/rec/conf/cikm/0008ZL23.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{YangZMT21,
author = {Heng Yang and
Biqing Zeng and
Mayi Xu and
Tianxing Wang},
title = {Back to Reality: Leveraging Pattern-driven Modeling to Enable Affordable
Sentiment Dependency Learning},
journal = {CoRR},
volume = {abs/2110.08604},
year = {2021},
url = {https://arxiv.org/abs/2110.08604},
eprinttype = {arXiv},
eprint = {2110.08604},
timestamp = {Fri, 22 Oct 2021 13:33:09 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2110-08604.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
📄 許可證
本項目採用 MIT 許可證。