Update README.md
Browse files
README.md
CHANGED
@@ -1,79 +1,101 @@
|
|
1 |
-
|
2 |
-
---
|
3 |
-
language:
|
4 |
-
- en
|
5 |
-
tags:
|
6 |
-
- aspect-based-sentiment-analysis
|
7 |
-
- PyABSA
|
8 |
-
license: mit
|
9 |
-
datasets:
|
10 |
-
- laptop14
|
11 |
-
- restaurant14
|
12 |
-
- restaurant16
|
13 |
-
- ACL-Twitter
|
14 |
-
- MAMS
|
15 |
-
- Television
|
16 |
-
- TShirt
|
17 |
-
- Yelp
|
18 |
-
metrics:
|
19 |
-
- accuracy
|
20 |
-
- macro-f1
|
21 |
-
widget:
|
22 |
-
- text: "[CLS] when tables opened up, the manager sat another party before us. [SEP] manager [SEP] "
|
23 |
-
---
|
24 |
-
|
25 |
-
#
|
26 |
-
This model is training with 30k+ ABSA samples, see [ABSADatasets](https://github.com/yangheng95/ABSADatasets). Yet the test sets are not included in pre-training, so you can use this model for training and benchmarking on common ABSA datasets, e.g., Laptop14, Rest14 datasets. (Except for the Rest15 dataset!)
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
```
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
##
|
48 |
-
This model is
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
loading: integrated_datasets/apc_datasets/
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
```
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- aspect-based-sentiment-analysis
|
7 |
+
- PyABSA
|
8 |
+
license: mit
|
9 |
+
datasets:
|
10 |
+
- laptop14
|
11 |
+
- restaurant14
|
12 |
+
- restaurant16
|
13 |
+
- ACL-Twitter
|
14 |
+
- MAMS
|
15 |
+
- Television
|
16 |
+
- TShirt
|
17 |
+
- Yelp
|
18 |
+
metrics:
|
19 |
+
- accuracy
|
20 |
+
- macro-f1
|
21 |
+
widget:
|
22 |
+
- text: "[CLS] when tables opened up, the manager sat another party before us. [SEP] manager [SEP] "
|
23 |
+
---
|
24 |
+
|
25 |
+
# Powered by [PyABSA](https://github.com/yangheng95/PyABSA): An open source tool for aspect-based sentiment analysis
|
26 |
+
This model is training with 30k+ ABSA samples, see [ABSADatasets](https://github.com/yangheng95/ABSADatasets). Yet the test sets are not included in pre-training, so you can use this model for training and benchmarking on common ABSA datasets, e.g., Laptop14, Rest14 datasets. (Except for the Rest15 dataset!)
|
27 |
+
|
28 |
+
|
29 |
+
## Usage
|
30 |
+
```python3
|
31 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
32 |
+
|
33 |
+
# Load the ABSA model and tokenizer
|
34 |
+
model_name = "yangheng/deberta-v3-base-absa-v1.1"
|
35 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
36 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
37 |
+
|
38 |
+
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
39 |
+
|
40 |
+
for aspect in ['camera', 'phone']:
|
41 |
+
print(aspect, classifier('The camera quality of this phone is amazing.', text_pair=aspect))
|
42 |
+
```
|
43 |
+
|
44 |
+
# DeBERTa for aspect-based sentiment analysis
|
45 |
+
The `deberta-v3-base-absa` model for aspect-based sentiment analysis, trained with English datasets from [ABSADatasets](https://github.com/yangheng95/ABSADatasets).
|
46 |
+
|
47 |
+
## Training Model
|
48 |
+
This model is trained based on the FAST-LCF-BERT model with `microsoft/deberta-v3-base`, which comes from [PyABSA](https://github.com/yangheng95/PyABSA).
|
49 |
+
To track state-of-the-art models, please see [PyASBA](https://github.com/yangheng95/PyABSA).
|
50 |
+
|
51 |
+
## Example in PyASBA
|
52 |
+
An [example](https://github.com/yangheng95/PyABSA/blob/release/demos/aspect_polarity_classification/train_apc_multilingual.py) for using FAST-LCF-BERT in PyASBA datasets.
|
53 |
+
|
54 |
+
## Datasets
|
55 |
+
This model is fine-tuned with 180k examples for the ABSA dataset (including augmented data). Training dataset files:
|
56 |
+
```
|
57 |
+
loading: integrated_datasets/apc_datasets/SemEval/laptop14/Laptops_Train.xml.seg
|
58 |
+
loading: integrated_datasets/apc_datasets/SemEval/restaurant14/Restaurants_Train.xml.seg
|
59 |
+
loading: integrated_datasets/apc_datasets/SemEval/restaurant16/restaurant_train.raw
|
60 |
+
loading: integrated_datasets/apc_datasets/ACL_Twitter/acl-14-short-data/train.raw
|
61 |
+
loading: integrated_datasets/apc_datasets/MAMS/train.xml.dat
|
62 |
+
loading: integrated_datasets/apc_datasets/Television/Television_Train.xml.seg
|
63 |
+
loading: integrated_datasets/apc_datasets/TShirt/Menstshirt_Train.xml.seg
|
64 |
+
loading: integrated_datasets/apc_datasets/Yelp/yelp.train.txt
|
65 |
+
|
66 |
+
```
|
67 |
+
If you use this model in your research, please cite our papers:
|
68 |
+
@article{YangL22,
|
69 |
+
author = {Heng Yang and
|
70 |
+
Ke Li},
|
71 |
+
title = {A Modularized Framework for Reproducible Aspect-based Sentiment Analysis},
|
72 |
+
journal = {CoRR},
|
73 |
+
volume = {abs/2208.01368},
|
74 |
+
year = {2022},
|
75 |
+
url = {https://doi.org/10.48550/arXiv.2208.01368},
|
76 |
+
doi = {10.48550/arXiv.2208.01368},
|
77 |
+
eprinttype = {arXiv},
|
78 |
+
eprint = {2208.01368},
|
79 |
+
timestamp = {Tue, 08 Nov 2022 21:46:32 +0100},
|
80 |
+
biburl = {https://dblp.org/rec/journals/corr/abs-2208-01368.bib},
|
81 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
82 |
+
}
|
83 |
+
```
|
84 |
+
@article{YangZMT21,
|
85 |
+
author = {Heng Yang and
|
86 |
+
Biqing Zeng and
|
87 |
+
Mayi Xu and
|
88 |
+
Tianxing Wang},
|
89 |
+
title = {Back to Reality: Leveraging Pattern-driven Modeling to Enable Affordable
|
90 |
+
Sentiment Dependency Learning},
|
91 |
+
journal = {CoRR},
|
92 |
+
volume = {abs/2110.08604},
|
93 |
+
year = {2021},
|
94 |
+
url = {https://arxiv.org/abs/2110.08604},
|
95 |
+
eprinttype = {arXiv},
|
96 |
+
eprint = {2110.08604},
|
97 |
+
timestamp = {Fri, 22 Oct 2021 13:33:09 +0200},
|
98 |
+
biburl = {https://dblp.org/rec/journals/corr/abs-2110-08604.bib},
|
99 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
100 |
+
}
|
101 |
```
|