File size: 1,195 Bytes
50e653d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144e8f5
50e653d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- ar

datasets:
 - ASTD

tags:
 - labr

widget:
- text: "العنف والقتل في محيط العالم في زياده يوميا"
- text: "الصداقه تزرع الحياه ازهارا"

---

# BERT-ASTD Balanced
Arabic version bert model fine tuned on ASTD dataset balanced version to identify twitter sentiments in Arabic language MSA dialect .

## Data
The model were fine-tuned on ~63000 book reviews in arabic using bert large arabic


## Results
| class    | precision | recall | f1-score | Support |
|----------|-----------|--------|----------|---------|
| 0        | 0.9328    | 0.9398 | 0.9363   | 133     |
| 1        | 0.9394    | 0.9323 | 0.9358   | 133     |
| Accuracy |           |        | 0.9361   | 266     |





## 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-ASTD"
model = AutoModelForSequenceClassification.from_pretrained(model_name,num_labels=2)
tokenizer = AutoTokenizer.from_pretrained(model_name)

```