Text Understanding for Programming in Natural Language: Control Structures
-
Name:
Konferenzartikel
-
Author:
Mathias Landhäußer
Ronny Hug -
Zusammenfassung
We investigate how natural languages such as English can be used as programming languages. Often, in natural language (as well as in programming) different actions happen at the same time or are repeated. In natural language we just say what is going to happen – in programming we use control structures. Story lines without equivalent language/phrase structures are unnatural and programs without control structures are hard to read. An empirical study showed how users express control structures in natural language.
We propose a new and automatic text analysis. It leverages Stanford’s typed dependencies to detect sentence structures that imply strictly sequential control flows, repetition, and parallelism.
The technique is analyzed in the context of Alice, a 3D programming environment, and AliceNLP, a system for programming Alice in ordinary English. We evaluate our approach with 52 texts with 795 control-flow-affected elements in total and show that 82% of these elements can be detected successfully. We performed a second evaluation with manually corrected input and find that our approach successfully detects the control structures 97% of the time in the absence of parser errors.
Bibtex
@inproceedings{,
author={Landh{\"a}u{\ss}er, Mathias and Hug, Ronny},
title={Text Understanding for Programming in Natural Language: Control Structures},
year=2015,
month=may,
booktitle={Proceedings of the 4th International Workshop on Realizing Artificial Intelligence Synergies in Software Engineering},
url={https://ps.ipd.kit.edu/downloads/},
doi={10.1109/RAISE.2015.9},
abstract={We investigate how natural languages such as English can be used as programming languages. Often, in natural language (as well as in programming) different actions happen at the same time or are repeated. In natural language we just say what is going to happen – in programming we use control structures. Story lines without equivalent language/phrase structures are unnatural and programs without control structures are hard to read. An empirical study showed how users express control structures in natural language. We propose a new and automatic text analysis. It leverages Stanford’s typed dependencies to detect sentence structures that imply strictly sequential control flows, repetition, and parallelism. The technique is analyzed in the context of Alice, a 3D programming environment, and AliceNLP, a system for programming Alice in ordinary English. We evaluate our approach with 52 texts with 795 control-flow-affected elements in total and show that 82% of these elements can be detected successfully. We performed a second evaluation with manually corrected input and find that our approach successfully detects the control structures 97% of the time in the absence of parser errors. },
pptUrl={https://ps.ipd.kit.edu/downloads/},
}