A document processing pipeline for the construction of a dataset for topic modeling based on the judgments of the Italian Supreme Court

Matteo Marulli, Glauco Panattoni, Marco Bertini
5/13/2025
cs.CL

No confident code implementation found for this paper.

Abstract

Topic modeling in Italian legal research is hindered by the lack of public datasets, limiting the analysis of legal themes in Supreme Court judgments. To address this, we developed a document processing pipeline that produces an anonymized dataset optimized for topic modeling. The pipeline integrates document layout analysis (YOLOv8x), optical character recognition, and text anonymization. The DLA module achieved a mAP@50 of 0.964 and a mAP@50-95 of 0.800. The OCR detector reached a mAP@50-95 of 0.9022, and the text recognizer (TrOCR) obtained a character error rate of 0.0047 and a word error rate of 0.0248. Compared to OCR-only methods, our dataset improved topic modeling with a diversity score of 0.6198 and a coherence score of 0.6638. We applied BERTopic to extract topics and used large language models to generate labels and summaries. Outputs were evaluated against domain expert interpretations. Claude Sonnet 3.7 achieved a BERTScore F1 of 0.8119 for labeling and 0.9130 for summarization.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{marulli2025document,
  title  = {A document processing pipeline for the construction of a dataset for topic modeling based on the judgments of the Italian Supreme Court},
  author = {Matteo Marulli and Glauco Panattoni and Marco Bertini},
  year   = {2025},
  eprint = {2505.08439},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.08439v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.08439.svg)](https://codeofpaper.com/paper/2505.08439)

Discussion