--- base_model: UBC-NLP/AraT5v2-base-1024 tags: - generated_from_trainer model-index: - name: bi-msa-egyptian-translator-masrawy results: [] language: - ar metrics: - bleu pipeline_tag: translation library_name: transformers --- # Masrawy-BiLingual-v1 **Masrawy-BiLingual-v1** is a bidirectional Arabic translation model designed to translate between **Modern Standard Arabic (MSA)** and **Egyptian Arabic**. This model was trained on a total of **360,000 sentences**, covering both directions (MSA → Egyptian and Egyptian → MSA). --- ## Evaluation Dataset The model was evaluated using held-out test sets consisting of **diverse, high-quality sentences** in both MSA and Egyptian Arabic. The evaluation datasets included: * **150 general conversational sentences** covering everyday topics. * **50 business and professional sentences** including emails, reports, and announcements. * **50 science and educational sentences** covering basic scientific concepts and educational content. * **50 entertainment and media sentences** including movie, TV, and music contexts. * **20 multi-sentence examples for each category** (assorted topics) to test contextual translation quality. This resulted in **thousands of sentences** across various domains to comprehensively assess the model's performance in realistic scenarios. --- ## Evaluation Results The model was evaluated on the above test sets for both translation directions. The results are as follows: | Task | BLEU | METEOR | CHRF | | -------------- | ------ | ------ | ----- | | MSA → Egyptian | 0.5806 | 0.7690 | 81.02 | | Egyptian → MSA | 0.5842 | 0.7901 | 79.83 | These metrics indicate strong performance in both directions for Egyptian↔MSA translation. --- ## Usage When using the model, it is important to **append a postfix** to the input text to indicate the desired translation direction: * To translate to **Egyptian Arabic**, append `` to the input. * To translate to **MSA**, append `` to the input. ### Example in Python (using Hugging Face `translation` pipeline) ```python from transformers import pipeline model_name = "oddadmix/Masrawy-BiLingual-v1" translator = pipeline("translation", model=model_name, tokenizer=model_name) # Example: Translate MSA → Egyptian input_text = "أنا أحب القراءة في المكتبة. " translation = translator(input_text)[0]['translation_text'] print("MSA → Egyptian:", translation) # Example: Translate Egyptian → MSA input_text = "أنا بحب أقرا في المكتبة. " translation = translator(input_text)[0]['translation_text'] print("Egyptian → MSA:", translation) ```