Análisis de sentimiento de textos cortos basado en medidas de centralidad en grafos y aprendizaje profundo
Sentiment analysis of short texts based on centrality measures and deep learning
Ver/ Abrir
Identificadores
URI: https://hdl.handle.net/10902/30799Registro completo
Mostrar el registro completo DCAutoría
Juncal Blanco, AitorFecha
2023-09Director/es
Derechos
Attribution-NonCommercial-NoDerivatives 4.0 International
Palabras clave
Grafos
Opinión
Modelo
Predicción
Métricas
Graphs
Opinion
Model
Prediction
Metrics
Resumen/Abstract
El análisis de sentimiento (o la minería de opinión) consiste en detectar información subjetiva en textos mediante modelos de aprendizaje automático y procesamiento del lenguaje natural. Una de las tareas clásicas del análisis de sentimiento es la de la identificación de la polaridad de un texto a través de su clasificación en, al menos, dos categorías (positiva y negativa).
En los últimos años, coincidiendo con el auge de los large-language models preentrenados, las propuestas de análisis de sentimiento han tendido hacia la definición de técnicas de caja negra con escasa o nula interpretabilidad. Por este motivo, han empezado a surgir modelos menos opacos que hacen hincapié en la representación semántica del texto como herramienta para ponderar la importancia de cada palabra o cada frase para la clasificación del texto completo.
En el caso de nuestro trabajo, optaremos por un modelo más sencillo e interpretable. Con un modelo así, lograremos, por un lado, que el modelo sea más rápido y permita un mayor número de ejecuciones en un mismo intervalo de tiempo, y, por otro lado, que sea más fácil entender cómo se construye el modelo y como funciona. De esta manera, tendremos un modelo eficaz y eficiente que no se comportará como una caja negra. Para lograr eso, seguiremos el siguiente proceso de trabajo:
Para comenzar, obtendremos los textos a analizar de un conjunto de datos en formato CSV. Posteriormente, realizaremos un preprocesamiento con dichos textos, logrando así un formato óptimo de los mismos para su entrada en el modelo. Luego, dividiremos los textos en dos conjuntos: Uno de entrenamiento y otro de test.
Primero, con los elementos del conjunto de entrenamiento crearemos un grafo de polaridad negativo con los textos negativos y un grafo de polaridad positivo con los positivos. Con esos grafos entrenaremos un modelo predictor, que tomará como entrada 8 métricas para cada texto, estas métricas se realizarán comparando dichos textos con ambos grafos de polaridad.
Por último, tomaremos el conjunto de test, un conjunto de textos no conocidos por el modelo y trataremos predecir si son negativos o positivos. Lo que nos permitirá evaluar la clasificación del modelo.
Sentiment analysis (or opinion mining) consists of detecting subjective information in texts by means of machine learning and natural language processing models. One of the classic tasks of sentiment analysis is to identify the polarity of a text by classifying it into at least two categories (positive and negative).
In recent years, coinciding with the rise of pre-trained large-language models, sentiment analysis proposals have tended towards the definition of black-box techniques with little or no interpretability. For this reason, less opaque models have begun to emerge that emphasize the semantic representation of the text as a tool for weighting the importance of each word or phrase for the classification of the whole text.
In the case of our work, we will opt for a simpler and more interpretable model. With such a model, we will achieve, on the one hand, that the model is faster and allows a greater number of executions in the same time interval, and, on the other hand, that it is easier to understand how the model is built and how it works. In this way, we will have an effective and efficient model that will not behave like a black box. To achieve this, we will follow the following work process:
To begin with, we will obtain the texts to be analyzed from a dataset in CSV format. Subsequently, we will perform a preprocessing with these texts, thus achieving an optimal format for their input into the model. Then, we will divide the texts into two sets: A training set and a test set.
First, with the elements of the training set we will create a negative polarity graph with the negative texts and a positive polarity graph with the positive ones. With these graphs we will train a predictor model, which will take as input 8 metrics for each text, these metrics will be made by comparing these texts with both polarity graphs.
Finally, we will take the test set, a set of texts not known to the model, and try to predict whether they are negative or positive. This will allow us to evaluate the classification of the model.