File size: 1,689 Bytes
7256981 3c9bdcc 6ab1b92 3c9bdcc 7256981 715e6a7 7256981 715e6a7 7256981 |
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 |
---
language:
- ar
widget:
- text: "قِفَا نَبْكِ مِنْ ذِكْرَى حَبِيبٍ ومَنْزِلِ [sep]بِسِقْطِ اللِّوَى بَيْنَ الدَّخُولِ فَحَوْمَلِ"
- text: "ليس الغريب غريب الشام واليمنُ[sep]إن الغريب غريب اللحد والكفن"
- text: "عَلى قَدْرِ أهْلِ العَزْم تأتي العَزائِمُ[sep] وَتأتي علَى قَدْرِ الكِرامِ المَكارمُ"
- text: "قم للمعلم وفّه التبجيلا[sep] كاد المعلم أن يكون رسولا"
tags:
- text classification
- news
---
## Arabic MARBERT News Article Classification Model
#### Model description
**arabic-MARBERT-poetry-classification Model** is a poetry classification model that was built by fine-tuning the [MARBERT](https://huggingface.co/UBC-NLP/MARBERT) model. For the fine-tuning, I used [APCD: Arabic Poem Comprehensive Dataset](https://hci-lab.github.io/ArabicPoetry-1-Private/) that includes 23 labels (البسيط,الطويل,الكامل,الوافر,الخفيف,السريع,..).
#### How to use
To use the model with a transformers pipeline:
```python
>>>from transformers import pipeline
>>>model = pipeline('text-classification', model='Ammar-alhaj-ali/arabic-MARBERT-poetry-classification')
>>>sentences = ['يطول اليوم لا ألقاك فيه [sep]ويوم نلتقي فيه قصير',
'أراك عصيّ الدمع شيمتك الصبر[sep]أما للهوى عليك نهي ولا أمر']
>>>model(sentences)
[{'label': 'الوافر', 'score': 0.988358199596405},
{'label': 'الطويل', 'score': 0.9784850478172302}]
``` |