ArabIcros: AI-Powered Arabic Crossword Puzzle Generation for Educational Applications

Kamyar Zeinalipour, Mohamed Zaky Saad, Marco Maggini, Marco Gori

Introduction

Crossword puzzles have long been recognized as effective pedagogical tools, fostering vocabulary acquisition, critical thinking, and cognitive engagement. However, the manual creation of these puzzles in Arabic is a labor-intensive task fraught with linguistic challenges. The complex morphology of the Arabic language, the necessity of diacritics, and the specific cultural nuances of clue-writing make automated generation particularly difficult. While English and Spanish educators have access to various automated tools, Arabic has remained underserved in this domain.

ArabIcros addresses this gap as the first AI-driven system designed to automatically generate educational Arabic crossword puzzles. By integrating large language models (LLMs) with a specialized grid-generation algorithm and a newly curated dataset, ArabIcros transforms raw educational text into structured, linguistically accurate puzzles.

Methodology

The ArabIcros architecture is a multi-stage pipeline designed to handle both content extraction and structural layout optimization. The system operates through two primary generation paths:

Generation Paths

  1. Text-to-Clue (Path A): This path utilizes zero-shot and few-shot learning—primarily leveraging GPT-4 and GPT-3.5-Turbo—to extract relevant keywords from a provided educational text and generate context-specific clues. This ensures the puzzle remains relevant to the specific lesson material.
  2. Keyword-to-Clue (Path B): For scenarios where specific keywords are provided without context, the system uses fine-tuned models (including GPT-3 variants and BERT-base-Arabic) to generate appropriate clues based on a vast library of existing crossword data.

Validation and Filtering

To maintain educational quality, a "Validator" module filters the output. It removes clues exceeding three words and identifies "hallucinations"—instances where the LLM generates information not present in the source text. A fine-tuned GPT-3-Davinci model serves as a high-accuracy classifier (85.74% accuracy) to distinguish between high-quality and nonsensical clues.

Schema Generation

Once clue-answer pairs are finalized, a specialized algorithm optimizes the grid layout using a weighted scoring formula:

$$Score = (FW + 0.5 \cdot LL) \cdot FR \cdot LR$$

Where:

  • FW: Count of filled words.
  • LL: Number of linked letters (intersections).
  • FR: Filled ratio (space efficiency).
  • LR: Ratio of linked letters to total letters.

This formula ensures the resulting grid is dense and maximizes the number of intersections, which is critical for the crossword experience.

The ArabIcros Dataset

A significant contribution of this research is the creation of a manually curated dataset of 57,706 Arabic clue-answer entries. Collected between 2020 and 2023, the data was scraped and OCR-processed from major publications such as Al-Joumhouria Journal and Al-Ghad Electronic Journal. After rigorous cleaning to remove duplicates and handle Arabic-specific idiosyncrasies (like reversal markers), the researchers arrived at 25,908 unique pairs. This dataset is publicly available on Hugging Face to support further research in Arabic NLP.

Key Insights and Results

The study revealed several critical findings regarding the performance of LLMs in an Arabic context:

  • Model Performance: In the end-to-end pipeline, GPT-4 demonstrated superior performance, achieving a keyword extraction accuracy of 95.05% and a clue generation accuracy of 94.62%.
  • Prompt Language Sensitivity: GPT-4 performed better at keyword extraction when given English prompts (78.95% total performance) compared to Arabic prompts (74.6%). Conversely, GPT-3.5-Turbo showed a significant preference for Arabic prompts.
  • Fine-Tuning Efficacy: For standalone keyword generation, fine-tuning was essential. A fine-tuned GPT-3.5-Turbo model achieved an 81% success rate in generating acceptable clues, outperforming general-purpose models.

Conclusion and Future Work

ArabIcros demonstrates that LLMs can effectively bridge the gap in Arabic educational resource generation. While the system successfully handles complex educational topics—such as physics or history—challenges remain regarding LLM hallucinations and highly technical jargon. Future work will focus on developing more advanced models for direct clue-answer generation and conducting classroom pilots to measure the system's impact on student engagement and retention in real-world educational settings.

Summary updated

BibTeX
@inproceedings{zeinalipour2023arabicros,
  author = {Kamyar Zeinalipour and Mohamed Zaky Saad and Marco Maggini and Marco Gori},
  title = {{ArabIcros: AI-Powered Arabic Crossword Puzzle Generation for Educational Applications}},
  booktitle = {ArabicNLP},
  year = {2023},
  url = {https://openreview.net/forum?id=T5zt82I6Ae},
}
Figure