In this paper, we describe a semantic approach to translate complex natural language commands and questions into an appropriate object-oriented source code. To address this task, we leverage the Semantic Web technology stack to develop CodeOntology, an open community-shared resource aimed at making open source code a first-class citizen of the Web, where it can be interlinked with other resources, enabling interesting search and analyses that are nowadays impossible. Hence, we propose an unsupervised algorithm which relies on CodeOntology for querying source code to retrieve a set of methods and code snippets that are ranked and combined to translate a natural language specification into a Java source code. Experimental results show that our approach is comparable with other state-of-the-art proprietary systems, such as the WolframAlpha computational knowledge engine.

Translating Natural Language to Code: an Unsupervised Ontology-based Approach

Mattia Atzeni;Maurizio Atzori
2018-01-01

Abstract

In this paper, we describe a semantic approach to translate complex natural language commands and questions into an appropriate object-oriented source code. To address this task, we leverage the Semantic Web technology stack to develop CodeOntology, an open community-shared resource aimed at making open source code a first-class citizen of the Web, where it can be interlinked with other resources, enabling interesting search and analyses that are nowadays impossible. Hence, we propose an unsupervised algorithm which relies on CodeOntology for querying source code to retrieve a set of methods and code snippets that are ranked and combined to translate a natural language specification into a Java source code. Experimental results show that our approach is comparable with other state-of-the-art proprietary systems, such as the WolframAlpha computational knowledge engine.
2018
978-1-5386-9555-5
File in questo prodotto:
File Dimensione Formato  
aike18 - translating natural language to code - an unsupervised approach.pdf

Solo gestori archivio

Tipologia: versione editoriale
Dimensione 819.9 kB
Formato Adobe PDF
819.9 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11584/256021
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 13
  • ???jsp.display-item.citation.isi??? 6
social impact