Publication Date
Spring 2026
Degree Type
Master's Project
Degree Name
Master of Science in Computer Science (MSCS)
Department
Computer Science
First Advisor
Mike Wu
Second Advisor
Sayma Akther
Third Advisor
Thomas Austin
Keywords
Legal NLP, clause classification, document summarization, transformer fine-tuning, class imbalance, LEDGAR, Multi-LexSum.
Abstract
Legal professionals process vast volumes of contracts, court judgments, and litigation filings on a daily basis, but manual review remains time-consuming and expensive. This brings up unique challenges in the domain of natural language processing like specialized vocabulary, severe class imbalance in labeled datasets, and document lengths exceeding standard transformer input limits, which are the problems that general-purpose models fail to adequately address. Although legal NLP has seen significant progress, the evaluation of domain-specific versus general- purpose transformer models on core legal tasks remains limited. This research address that gap by giving a comparative analysis of fine-tuned transformer models on two tasks: clause classification and legal document summarization. For the classification task LEDGAR dataset is used to fine-tune BERT-base and Legal-BERT under four different configurations: standard cross-entropy, weighted cross-entropy, focal loss, and oversampling. Legal-BERT achieving 88.62% Micro-F1, exceeding the LexGLUE benchmark. For summarization, three strategies are evaluated on Multi-LexSum: truncation, hierarchical chunking, and LED-base-16384 with native long-context processing. Hierarchical chunking achieves ROUGE-2 of 24.25, surpassing the prior state-of-the-art of 20.8. Notably, truncation covers only 6.1% of document content, this two-stage approach compresses source documents by 156x, enabling 89.1% of cases to fit within BART’s input limit without discarding document content.
Recommended Citation
Nagaraj, Skanda Gonur, "Legal Document Analysis - Clause Classification and Summarization" (2026). Master's Projects. 1783.
DOI: https://doi.org/10.31979/etd.wfwb-sywc
https://scholarworks.sjsu.edu/etd_projects/1783