Algoritmos de traducción de consultas en lenguaje natural a SPARQL

Rodríguez Martín, Alberto (2021). Algoritmos de traducción de consultas en lenguaje natural a SPARQL. Proyecto Fin de Carrera / Trabajo Fin de Grado, E.T.S. de Ingenieros Informáticos (UPM), Madrid, España.

Description

Title: Algoritmos de traducción de consultas en lenguaje natural a SPARQL
Author/s:
  • Rodríguez Martín, Alberto
Contributor/s:
Item Type: Final Project
Degree: Grado en Ingeniería Informática
Date: January 2021
Subjects:
Faculty: E.T.S. de Ingenieros Informáticos (UPM)
Department: Inteligencia Artificial
Creative Commons Licenses: Recognition - No derivative works - Non commercial

Full text

[thumbnail of TFG_ALBERTO_RODRIGUEZ_MARTIN.pdf]
Preview
PDF - Requires a PDF viewer, such as GSview, Xpdf or Adobe Acrobat Reader
Download (2MB) | Preview

Abstract

Este trabajo tiene como objetivo el diseño y desarrollo de algoritmos que nos permitan la traducción de preguntas escritas en lenguaje natural a consultas SPARQL. De este modo las consultas pueden ser utilizadas para obtener información desde grafos de conocimiento implementados en RDF. El trabajo engloba todo el proceso necesario para llegar a dicho objetivo, incluyendo las fases esperables de un trabajo de investigación en el campo de la Inteligencia Artificial, más en concreto en el apartado del Procesamiento del Lenguaje Natural. Siendo necesario en primer lugar, conocer el entorno y alcance del proyecto. Este proyecto es una rama de un proyecto mayor Drugs4Covid. Nacido como causa de la situación de excepcional de la pandemia, el proyecto consiste en la creación de un grafo de conocimiento utilizando técnicas de inteligencia artificial sobre los diferentes artículos científicos que surgieron durante la pandemia para facilitar el trabajo a los profesionales a la hora de poder estar al tanto de todas las investigaciones que se llevaban a cabo sobre los diferentes medicamentos y sus usos frente a la enfermedad. Por ello se entiende la utilidad de nuestro proyecto como medio para que profesionales sin conocimiento en lenguajes de consulta como SPARQL puedan acceder y obtener información de dicho grafo de conocimiento por medio de una simple consulta en lenguaje natural. Un grafo de conocimiento es un tipo especial de base de datos para la gestión del conocimiento, que usa un modelo de datos en grafo. Se enlazan las diferentes entidades entre sí mediante propiedades semánticas. Para la construcción del grafo, es requerido un esquema RDF o Marco de Descripción de Recursos, es un modelo de datos para meta-datos de la web, usado como un método conceptual de la información que se implementa en los recursos web. Por ello la extensión semántica de RDF, nos produce el RDFS, un lenguaje de ontologías que proporciona los elementos básicos para la descripción de vocabularios de un grafo de conocimiento. Por último, las consultas sobre ese grafo de conocimiento se realizan a través de SPARQL, siendo el acrónimo de Protocol and RDF Query Language, lenguaje estandarizado para las consultas de grafos RDF. Teniendo claro el foco del proyecto, ha sido necesario obtener una serie de conocimientos previos relevantes concernientes al problema de la traducción de consultas. Por ello se realizó una serie de lecturas de documentación inicial relacionadas con los paper más ilustrativos en los últimos años referentes a Question Answering (QA) y semantic parsing. Como consecuencia del no completo entendimiento de los apartados técnicos de los artículos, uso de técnicas de procesamiento de lenguaje natural o uso de redes neuronales, comencé a documentarme sobre los fundamentos en estas dos temáticas. Por ello visualice dos asignaturas relevantes de las universidades de Stanford (CS224N) y NYU (DS-GA1008) sobre dichas temáticas. Con estos conocimientos previos estaba en disposición de comenzar a revisar el State-Of-The-Art (SOTA), se realizó una búsqueda exhaustiva en lo referente al problema sobre artículos científicos publicados en los últimos 10 años, y se creó una tabla con información de cada artículo en cuestión, para tener una visión global y poder visualizar el actual SOTA. Además, se compilaron y testearon las implementaciones de los algoritmos con los resultados más prometedores para comprobar cual se podría utilizar como base. Con la idea de avanzar en el SOTA, se procedió a realizar un nuevo algoritmo a través de varios métodos. Se concretó el lenguaje sobre el que se iba a implementar, Python. En lo referente a mi parte, me correspondió desarrollar un algoritmo que reutilizase el actual SOTA sobre LC_QUAD, el dataset más grande de consultas Lenguaje natural - SPARQL e intentar adaptarlo a nuestro grafo de conocimiento. Este SOTA era el implementado por Deeppavlov. Finalmente, todos estos algoritmos se implementaron como micro servicios. Y por último se implementó un servicio general encargado de seleccionar los micro servicios implementados que generase una mejor respuesta. Por ello este trabajo recoge todo el proceso de desarrollo e investigación de un servicio funcional utilizando soluciones a problemas del campo del Procesamiento del Lenguaje Natural (PLN), más concretamente al problema relacionado con el QA y Semantic Procesing sobre Knowledge Graph.---ABSTRACT---The objective of this work is the design and development of algorithms that allow the translation of questions written in natural language to SPARQL queries. In this way the queries can be used to obtain information from knowledge graphs implemented in RDF. The work includes all the necessary process to reach this objective, including the expected phases of a research work in the field of Artificial Intelligence, more specifically in the field of Natural Language Processing. First of all, it is necessary to know the environment and scope of the project. This project is a branch of a larger project Drugs4Covid. Born as a result of the exceptional situation of the pandemic, the project consists on the creation of a knowledge graph using artificial intelligence techniques on the different scientific articles that emerged during the pandemic to facilitate the work of professionals in order to be aware of all the research being carried out on the different drugs and their uses against the disease. Therefore, it is understood the usefulness of our project as a means for professionals without knowledge in query languages such as SPARQL to access and obtain information from this knowledge graph by means of a simple natural language query. A knowledge network is a special type of knowledge management database that uses a network data model. The different entities are linked to each other by means of semantic properties. For the construction of the network, a schema RDF or Resource Description Framework is required, it is a data model for web meta-data, used as a conceptual method of the information that is implemented in web resources. Therefore, the semantic extension of RDF, produces the RDFS, an ontology language that provides the basic elements for the description of vocabularies of a knowledge graph. Finally, queries on this knowledge graph are performed through SPARQL, being the acronym of Protocol and RDF Query Language, a standardized language for querying RDF graphs. Having clear the focus of the project, it has been necessary to obtain a series of relevant prior knowledge concerning the problem of query translation. Therefore, a series of initial literature readings related to the most illustrative papers in recent years concerning Question Answering (QA) and semantic parsing were carried out. As a consequence of not fully understanding the technical sections of the articles, the use of natural language processing techniques or the use of neural networks, I started to document myself on the fundamentals of these two topics. Therefore, I visualized 2 relevant subjects from the universities of Stanford (CS224N) and NYU (DS-GA1008) on these topics. With this background knowledge I was ready to start reviewing the State-Of-The-Art (SOTA), an exhaustive search on the problem was performed on scientific articles published in the last 10 years, and a table was created with information on each article in question, in order to have a global view and to be able to visualize the current SOTA. In addition, the implementations of the algorithms with the most promising results were compiled and tested to see which one could be used as a basis. With the idea of advancing in the SOTA, a new algorithm was developed through several methods. The language on which it was to be implemented, Python, was specified. As far as my part was concerned, I had to develop an algorithm that would reuse the current SOTA on LCQUAD, the largest dataset of Natural Language - SPARQL queries, and try to adapt it to our knowledge graph. This SOTA was the one implemented by Deeppavlov. Finally all these algorithms were implemented as micro services. And finally a general service was implemented in charge of selecting the implemented micro services that would generate a better response. Therefore, this work gathers the whole process of development and research of a functional service using solutions to problems in the field of Natural Language Processing (NLP), more specifically to the problem related to the QA and Semantic Processing on Knowledge Graph.

More information

Item ID: 66308
DC Identifier: https://oa.upm.es/66308/
OAI Identifier: oai:oa.upm.es:66308
Deposited by: Biblioteca Facultad de Informatica
Deposited on: 08 Mar 2021 10:01
Last Modified: 08 Mar 2021 10:01
  • Logo InvestigaM (UPM)
  • Logo GEOUP4
  • Logo Open Access
  • Open Access
  • Logo Sherpa/Romeo
    Check whether the anglo-saxon journal in which you have published an article allows you to also publish it under open access.
  • Logo Dulcinea
    Check whether the spanish journal in which you have published an article allows you to also publish it under open access.
  • Logo de Recolecta
  • Logo del Observatorio I+D+i UPM
  • Logo de OpenCourseWare UPM