
# An Arabic abstractive text summarization model
A Transformer-based encoder-decoder model which has been trained on a dataset of 384,764 paragraph-summary pairs.

Paper: [Arabic abstractive text summarization using RNN-based and transformer-based architectures](https://www.sciencedirect.com/science/article/abs/pii/S0306457322003284).

Dataset: [link](https://data.mendeley.com/datasets/7kr75c9h24/1).

The model can be used as follows:
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
from arabert.preprocess import ArabertPreprocessor

model_name="malmarjeh/transformer"
preprocessor = ArabertPreprocessor(model_name="")

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
pipeline = pipeline("text2text-generation",model=model,tokenizer=tokenizer)

text = "شهدت مدينة طرابلس، مساء أمس الأربعاء، احتجاجات شعبية وأعمال شغب لليوم الثالث على التوالي، وذلك بسبب تردي الوضع المعيشي والاقتصادي. واندلعت مواجهات عنيفة وعمليات كر وفر ما بين الجيش اللبناني والمحتجين استمرت لساعات، إثر محاولة فتح الطرقات المقطوعة، ما أدى إلى إصابة العشرات من الطرفين."
text = preprocessor.preprocess(text)

result = pipeline(text,
            pad_token_id=tokenizer.eos_token_id,
            num_beams=3,
            repetition_penalty=3.0,
            max_length=200,
            length_penalty=1.0,
            no_repeat_ngram_size = 3)[0]['generated_text']
result
>>> 'احتجاجات شعبية في طرابلس لليوم الثالث على التوالي'
```

## Contact:
<banimarje@gmail.com>

{"language": ["ar"], "tags": ["Transformer", "MSA", "Arabic Text Summarization", "Arabic News Title Generation", "Arabic Paraphrasing"], "widget": [{"text": "\u0634\u0647\u062f\u062a \u0645\u062f\u064a\u0646\u0629 \u0637\u0631\u0627\u0628\u0644\u0633\u060c \u0645\u0633\u0627\u0621 \u0623\u0645\u0633 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621\u060c \u0627\u062d\u062a\u062c\u0627\u062c\u0627\u062a \u0634\u0639\u0628\u064a\u0629 \u0648\u0623\u0639\u0645\u0627\u0644 \u0634\u063a\u0628 \u0644\u0644\u064a\u0648\u0645 \u0627\u0644\u062b\u0627\u0644\u062b \u0639\u0644\u0649 \u0627\u0644\u062a\u0648\u0627\u0644\u064a\u060c \u0648\u0630\u0644\u0643 \u0628\u0633\u0628\u0628 \u062a\u0631\u062f\u064a \u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0645\u0639\u064a\u0634\u064a \u0648\u0627\u0644\u0627\u0642\u062a\u0635\u0627\u062f\u064a. \u0648\u0627\u0646\u062f\u0644\u0639\u062a \u0645\u0648\u0627\u062c\u0647\u0627\u062a \u0639\u0646\u064a\u0641\u0629 \u0648\u0639\u0645\u0644\u064a\u0627\u062a \u0643\u0631 \u0648\u0641\u0631 \u0645\u0627 \u0628\u064a\u0646 \u0627\u0644\u062c\u064a\u0634 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064a \u0648\u0627\u0644\u0645\u062d\u062a\u062c\u064a\u0646 \u0627\u0633\u062a\u0645\u0631\u062a \u0644\u0633\u0627\u0639\u0627\u062a\u060c \u0625\u062b\u0631 \u0645\u062d\u0627\u0648\u0644\u0629 \u0641\u062a\u062d \u0627\u0644\u0637\u0631\u0642\u0627\u062a \u0627\u0644\u0645\u0642\u0637\u0648\u0639\u0629\u060c \u0645\u0627 \u0623\u062f\u0649 \u0625\u0644\u0649 \u0625\u0635\u0627\u0628\u0629 \u0627\u0644\u0639\u0634\u0631\u0627\u062a \u0645\u0646 \u0627\u0644\u0637\u0631\u0641\u064a\u0646."}]}
transformers pytorch encoder-decoder text2text-generation Transformer MSA Arabic Text Summarization Arabic News Title Generation Arabic Paraphrasing ar autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #Transformer #MSA #Arabic Text Summarization #Arabic News Title Generation #Arabic Paraphrasing #ar #autotrain_compatible #endpoints_compatible #has_space #region-us 


# An Arabic abstractive text summarization model
A Transformer-based encoder-decoder model which has been trained on a dataset of 384,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows:


## Contact:
<banimarje@URL>

# An Arabic abstractive text summarization model
A Transformer-based encoder-decoder model which has been trained on a dataset of 384,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows: ## Contact:
<banimarje@URL>
TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #Transformer #MSA #Arabic Text Summarization #Arabic News Title Generation #Arabic Paraphrasing #ar #autotrain_compatible #endpoints_compatible #has_space #region-us 
 # An Arabic abstractive text summarization model
A Transformer-based encoder-decoder model which has been trained on a dataset of 384,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows: ## Contact:
<banimarje@URL>
passage: TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #Transformer #MSA #Arabic Text Summarization #Arabic News Title Generation #Arabic Paraphrasing #ar #autotrain_compatible #endpoints_compatible #has_space #region-us 
# An Arabic abstractive text summarization model
A Transformer-based encoder-decoder model which has been trained on a dataset of 384,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows:## Contact:
<banimarje@URL>