Ammar-alhaj-ali's picture
Update README.md
715e6a7
|
raw
history blame
1.69 kB
metadata
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 model. For the fine-tuning, I used APCD: Arabic Poem Comprehensive Dataset that includes 23 labels (البسيط,الطويل,الكامل,الوافر,الخفيف,السريع,..).

How to use

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.988358199596405},
 {'label': 'الطويل', 'score': 0.9784850478172302}]