Improving the Multi-Class Classification of Non-Functional Requirements in Spanish: A Study of Dataset Balancing and Performance
Abstract
While the classification of non-functional requirements (NFRs) has been widely studied in English-language contexts, empirical evidence for other languages remains limited. This is particularly relevant for requirements engineering practice, where requirements are often written in the native language of stakeholders. Progress in this area is also constrained by the limited availability of public datasets and the prevalence of class imbalance. Our study addresses these challenges through experiments on multi-class NFR classification in Spanish. Rather than focusing only on selecting the best-performing classifier, it examines how algorithm-vectorization combinations, dataset balancing, and testing with unseen data affect the observed performance of automated NFR classification. Logistic Regression and Naive Bayes demonstrated superior performance on the translated dataset, achieving f1-scores of 82% and 81%, respectively. Although overall performance decreased on the balanced dataset, specific underrepresented classes such as Portability and Fault Tolerance benefited from the balancing process. Shallow Machine Learning algorithms are effective for classifying Spanish non-functional requirements, particularly when addressing data imbalance. The study highlights the importance of dataset balancing in improving classification performance for specific classes and provides insights into the challenges of generalizing models across datasets.