Classifying long legal documents using short random chunks

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteur principal: Cabrera-Diego, Luis Adrián
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912798266621952
author Cabrera-Diego, Luis Adrián
author_facet Cabrera-Diego, Luis Adrián
contents Classifying legal documents is a challenge, besides their specialized vocabulary, sometimes they can be very long. This means that feeding full documents to a Transformers-based models for classification might be impossible, expensive or slow. Thus, we present a legal document classifier based on DeBERTa V3 and a LSTM, that uses as input a collection of 48 randomly-selected short chunks (max 128 tokens). Besides, we present its deployment pipeline using Temporal, a durable execution solution, which allow us to have a reliable and robust processing workflow. The best model had a weighted F-score of 0.898, while the pipeline running on CPU had a processing median time of 498 seconds per 100 files.
format Preprint
id arxiv_https___arxiv_org_abs_2512_24997
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Classifying long legal documents using short random chunks
Cabrera-Diego, Luis Adrián
Computation and Language
Artificial Intelligence
Classifying legal documents is a challenge, besides their specialized vocabulary, sometimes they can be very long. This means that feeding full documents to a Transformers-based models for classification might be impossible, expensive or slow. Thus, we present a legal document classifier based on DeBERTa V3 and a LSTM, that uses as input a collection of 48 randomly-selected short chunks (max 128 tokens). Besides, we present its deployment pipeline using Temporal, a durable execution solution, which allow us to have a reliable and robust processing workflow. The best model had a weighted F-score of 0.898, while the pipeline running on CPU had a processing median time of 498 seconds per 100 files.
title Classifying long legal documents using short random chunks
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2512.24997