Citation classification and key phrase extraction in legal texts using machine learning: an examination of the legal text classification dataset
摘要
This paper investigates the application of machine learning techniques for both legal citation classification and semantic analysis on the Legal Text Classification Dataset. It compares the performance of Logistic Regression, Naive Bayes, and Linear Support Vector Machine models in multiclass legal citation prediction. To address such extreme class imbalances, SMOTE oversampling and GridSearchCV hyperparameter optimization are used. Experimental results indicate that the best overall performance is achieved by the tuned Linear SVM model with 95% accuracy and a macro F1-score of 0.94, followed by Logistic Regression at 93% accuracy, whereas Naive Bayes turns out to perform comparably worse. Apart from the classification tasks, topic modeling using Latent Dirichlet Allocation unravels coherent thematic structures within judicial reasoning and cosine similarity applied to semantically related legal case retrieval. The fairness-oriented linguistic analysis further identifies significant gender imbalance in representation within judicial texts, while BERT-based contextual sentiment evaluation does not indicate explicit gender bias in the tested scenarios. The main contribution of this study will be to provide a compact and transparent analytical framework that integrates classification performance, semantic structure, and fairness considerations and demonstrates the practical feasibility of traditional machine learning methods for large-scale analytics of legal texts.