Token Classification
Transformers
Safetensors
English
Chinese
deberta-v2
aspect-based-sentiment-analysis
sentiment-analysis
sequence-labeling
deberta
Instructions to use yangheng/deberta-v3-base-end2end-absa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yangheng/deberta-v3-base-end2end-absa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="yangheng/deberta-v3-base-end2end-absa")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("yangheng/deberta-v3-base-end2end-absa") model = AutoModelForTokenClassification.from_pretrained("yangheng/deberta-v3-base-end2end-absa") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ widget:
|
|
| 16 |
- text: 这家餐厅的牛排很好吃,但是服务很慢。
|
| 17 |
---
|
| 18 |
|
| 19 |
-
#
|
| 20 |
|
| 21 |
This model performs end-to-end Aspect-Based Sentiment Analysis (ABSA) by jointly extracting aspect terms and their sentiments via a single token-classification head. Labels are merged as IOB-with-sentiment, e.g. `B-ASP-Positive`, `I-ASP-Negative`, or `O` for non-aspect tokens.
|
| 22 |
|
|
@@ -79,6 +79,10 @@ aspects = postprocess_entities(preds)
|
|
| 79 |
print(aspects)
|
| 80 |
```
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
## FastAPI serving (optional)
|
| 83 |
|
| 84 |
You can deploy a simple REST service using FastAPI:
|
|
|
|
| 16 |
- text: 这家餐厅的牛排很好吃,但是服务很慢。
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# Multilingual End-to-End Aspect-based Sentiment Analysis
|
| 20 |
|
| 21 |
This model performs end-to-end Aspect-Based Sentiment Analysis (ABSA) by jointly extracting aspect terms and their sentiments via a single token-classification head. Labels are merged as IOB-with-sentiment, e.g. `B-ASP-Positive`, `I-ASP-Negative`, or `O` for non-aspect tokens.
|
| 22 |
|
|
|
|
| 79 |
print(aspects)
|
| 80 |
```
|
| 81 |
|
| 82 |
+
## Enhanced Sentiment classification
|
| 83 |
+
The aspect sentiment analysis performance can be improved by the joint aspect term extraction and aspect sentiment classification.
|
| 84 |
+
Find the example [here](https://huggingface.co/yangheng/deberta-v3-base-absa-v1.1/blob/main/end2end_absa.py)
|
| 85 |
+
|
| 86 |
## FastAPI serving (optional)
|
| 87 |
|
| 88 |
You can deploy a simple REST service using FastAPI:
|