From Legal Texts to Structured Knowledge: A Comprehensive Pipeline for Legal Text Summarization
摘要
This paper introduces a comprehensive and generalizable pipeline for legal text summarization, with the low-resource Arabic language serving as a use case. Designed to bridge the gap between raw legal documents and structured knowledge representation, our approach leverages a dataset of 24,656 Moroccan legal cases, encompassing data extraction and processing, LLM-assisted annotations for gold-standard summaries, and a knowledge distillation approach to transfer summarization capabilities from a teacher model to a fine-tuned smaller LLM to produce structured, JSON-formatted summaries adhering to a specific template. Our fine-tuning approach achieves substantial performance improvement over the base LLM specifically on Moroccan legal text summarization and structured output generation, with evaluation metrics demonstrating an increase in summarization precision of up to 26%. Furthermore, we extend the application of this resource by constructing an interactive knowledge graph that visualizes relationships between cases, legal principles, and parties involved, enabling advanced queries and legal trend analysis. The publicly available dataset and fine-tuned model as resources enable reproducibility and offer a scalable solution for structuring legal knowledge in low-resource languages like Arabic.