Public trust in political and legal institutions is essential for the proper functioning of democracy. The legality and acceptability of the legislation and reforms enacted are significantly affected by the widespread mistrust of Peru’s political institutions, particularly the Congress of the Republic. This study explores the use of Machine Learning (ML) and Deep Learning (DL) techniques to analyze the sentiment of public comments on Peruvian bills. The proposed methodology consists of five phases: dataset collection; preprocessing; feature extraction (Tf-Idf, Bag of Words, and Word2Vec); model implementation (ML (LR, SVM, NB, and RF), DL (LSTM, CNN, BERTA, RoBERTa, and RNN)); and evaluation. The results of the transformer-based models, such as BERT and RoBERTa, achieved superior performance in validation with accuracy rates of 88.94% and 89.61%, respectively, indicating better generalization and handling of complex sentiment nuances. Overall, the study concludes that transformer-based models such as BERT and RoBERTa offer higher accuracy and better adaptability to complex sentiment contexts, especially in legal and political discourse.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Sentiment Analysis of Comments on Peruvian Draft Laws Using Machine Learning and Deep Learning Techniques

  • Benny Carrera,
  • Gerson Evangelista,
  • Wilfredo Ticona

摘要

Public trust in political and legal institutions is essential for the proper functioning of democracy. The legality and acceptability of the legislation and reforms enacted are significantly affected by the widespread mistrust of Peru’s political institutions, particularly the Congress of the Republic. This study explores the use of Machine Learning (ML) and Deep Learning (DL) techniques to analyze the sentiment of public comments on Peruvian bills. The proposed methodology consists of five phases: dataset collection; preprocessing; feature extraction (Tf-Idf, Bag of Words, and Word2Vec); model implementation (ML (LR, SVM, NB, and RF), DL (LSTM, CNN, BERTA, RoBERTa, and RNN)); and evaluation. The results of the transformer-based models, such as BERT and RoBERTa, achieved superior performance in validation with accuracy rates of 88.94% and 89.61%, respectively, indicating better generalization and handling of complex sentiment nuances. Overall, the study concludes that transformer-based models such as BERT and RoBERTa offer higher accuracy and better adaptability to complex sentiment contexts, especially in legal and political discourse.