Downloads · 30 days
16
0% of all-time downloads
Ammar-alhaj-ali/arabic-MARBERT-poetry-classification
arabic-MARBERT-poetry-classification is a text classification model from Ammar-alhaj-ali. Use it when you need a label for a piece of text. It is set up for transformers.
arabic-MARBERT-poetry-classification Model is a poetry classification model that was built by fine-tuning the MARBERT model. For the fine-tuning, I used APCD: Arabic Poem Comprehensive Dataset that includes 23 labels…
Downloads · 30 days
16
0% of all-time downloads
All-time downloads
43.1K
Public
Repo size
1.3 GB
Likes
3
Public
Click a slice to open those files.
.bin652 MB · 99%
From the Hugging Face model README
arabic-MARBERT-poetry-classification Model is a poetry classification model that was built by fine-tuning the MARBERT model. For the fine-tuning, I used APCD: Arabic Poem Comprehensive Dataset that includes 23 labels (البسيط,الطويل,الكامل,الوافر,الخفيف,السريع,..).
To use the model with a transformers pipeline:
>>>from transformers import pipeline
>>>model = pipeline('text-classification', model='Ammar-alhaj-ali/arabic-MARBERT-poetry-classification')
>>>sentences = ['ويوم نلتقي فيه قصير[sep]يطول اليوم لا ألقاك فيه',
'أما للهوى عليك نهي ولا أمر[sep]أراك عصيّ الدمع شيمتك الصبر']
>>>model(sentences)
[{'label': 'الوافر', 'score': 0.9979557991027832},
{'label': 'الطويل', 'score': 0.9646275043487549}]