File size: 1,316 Bytes
11baba9 1cfc9dc 11baba9 9509718 11baba9 9509718 11baba9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
---
language:
- ar
datasets:
- HARD
tags:
- HARD
widget:
- text: "جيد. المكان جميل وهاديء. كل شي جيد ونظيف"
- text: "استغرب تقييم الفندق كخمس نجوم”. لا شي. يستحق"
---
# BERT-ASTD Balanced
Arabic version bert model fine tuned on Hotel Arabic Reviews dataset from booking.com (HARD) dataset balanced version to identify sentiments opinion in Arabic language.
## Data
The model were fine-tuned on ~93000 book reviews in arabic using bert large arabic
Dataset:
- Train 70%
- Validation: 10%
- Test: 20%
## Results
| class | precision | recall | f1-score | Support |
|----------|-----------|--------|----------|---------|
| 0 | 0.9733 | 0.9547 | 0.9639 | 10570 |
| 1 | 0.9555 | 0.9738 | 0.9646 | 10570 |
| Accuracy | | | 0.9642 | 21140 |
## How to use
You can use these models by installing `torch` or `tensorflow` and Huggingface library `transformers`. And you can use it directly by initializing it like this:
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name="mofawzy/Bert-hard-balanced"
model = AutoModelForSequenceClassification.from_pretrained(model_name,num_labels=2)
tokenizer = AutoTokenizer.from_pretrained(model_name)
``` |