Abstract
dc:description.abstractThe increasing volume of digital legal information creates new challenges forthe organization and classification of legal documents. In the Portugueselegal domain, automatic classification can support the management of largedocument collections, but predictive performance alone may not be sufficientwhen the resulting decisions must also be understood by legal professionals.This work investigates methods for automatically classifying Portuguese legislation and jurisprudence according to document type, considering both predictive performance and explainability. The evaluated approaches included a textual rule-based baseline, classical machine learning classifiers using TF-IDF or fixed embeddings from the encoder-only models Albertina and Legal-BERTimbau, fine-tuning of both models, and zero-shot prompt-based classification using the decoder-only Portuguese language model AMALIA.Given the number of classes and their imbalanced distribution, classificationperformance was evaluated not only through accuracy but also through macro-F1,which gives equal importance to each class. The results show that fine-tunedLegal-BERTimbau achieved the highest macro-F1 among the evaluated approaches,reaching 0.96 for legislation and 0.90 for jurisprudence. Nevertheless,classical approaches remained highly competitive, with TF-IDF combined withSVM obtaining macro-F1 scores of 0.93 and 0.84, respectively. In contrast,zero-shot classification with AMALIA required no task-specific training butobtained substantially lower predictive performance and introduced considerablyhigher inference costs.Explainability was explored through three complementary approaches: feature-based explanations using LIME, example-based explanations using similar documents, and natural-language explanations generated by AMALIA. An exploratory evaluation involving four legal professionals showed that LIME and example-based explanations were the preferred approaches among the participants. Natural-language explanations were considered easy to understand but received lower evaluations regarding perceived value, fidelity, and trust.Overall, the results demonstrate that Portuguese legal documents can be classified with high predictive performance while providing complementary mechanisms for interpreting predictions. They also show that increasing model complexity does not necessarily produce proportional improvements, highlighting the importance of considering predictive performance, computational requirements, and explainability.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Alves, Duarte Nuno Vieira de Almeida Patrício
- Advisor dc:contributor.advisor
-
- Oliveira, Hugo Ricardo Gonçalo
Subjects
dc:subject × 10- Portuguese Legal Document Classification
- Natural Language Processing
- Explainable Artificial Intelligence
- Machine Learning
- Legal Artificial Intelligence
- Classificação de Documentos Jurídicos Portugueses
- Processamento de Linguagem Natural
- Inteligência Artificial Explicável
- Aprendizagem Automática
- Inteligência Artificial Jurídica
Rights
dc:rights- Statement dc:rights
-
- openAccess
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Tid
- 204413834