11 research outputs found

    From Natural Language Specifications to Program Input Parsers

    Get PDF
    We present a method for automatically generating input parsers from English specifications of input file formats. We use a Bayesian generative model to capture relevant natural language phenomena and translate the English specification into a specification tree, which is then translated into a C++ input parser. We model the problem as a joint dependency parsing and semantic role labeling task. Our method is based on two sources of information: (1) the correlation between the text and the specification tree and (2) noisy supervision as determined by the success of the generated C++ parser in reading input examples. Our results show that our approach achieves 80.0\% F-Score accuracy compared to an F-Score of 66.7\% produced by a state-of-the-art semantic parser on a dataset of input format specifications from the ACM International Collegiate Programming Contest (which were written in English for humans with no intention of providing support for automated processing)National Science Foundation (U.S.) (Grant IIS-0835652)Battelle Memorial Institute (PO #300662

    Machine Translation from Natural Language to Code using Long-Short Term Memory

    Full text link
    Making computer programming language more understandable and easy for the human is a longstanding problem. From assembly language to present day's object-oriented programming, concepts came to make programming easier so that a programmer can focus on the logic and the architecture rather than the code and language itself. To go a step further in this journey of removing human-computer language barrier, this paper proposes machine learning approach using Recurrent Neural Network (RNN) and Long-Short Term Memory (LSTM) to convert human language into programming language code. The programmer will write expressions for codes in layman's language, and the machine learning model will translate it to the targeted programming language. The proposed approach yields result with 74.40% accuracy. This can be further improved by incorporating additional techniques, which are also discussed in this paper.Comment: 8 pages, 3 figures, conferenc

    A Syntactic Neural Model for General-Purpose Code Generation

    Full text link
    We consider the problem of parsing natural language descriptions into source code written in a general-purpose programming language like Python. Existing data-driven methods treat this problem as a language generation task without considering the underlying syntax of the target programming language. Informed by previous work in semantic parsing, in this paper we propose a novel neural architecture powered by a grammar model to explicitly capture the target syntax as prior knowledge. Experiments find this an effective way to scale up to generation of complex programs from natural language descriptions, achieving state-of-the-art results that well outperform previous code generation and semantic parsing approaches.Comment: To appear in ACL 201

    ПРОГРАММИРОВАНИЕ НА ЯЗЫКАХ, ПРИБЛИЖЕННЫХ К ЕСТЕСТВЕННОМУ: ОБЗОР ЛИТЕРАТУРЫ

    Get PDF
    Paper addresses a number of scientific papers devoted to the issues of programming languages close to natural languages. Description of classical approaches to the design of natural programming languages and new approaches that have made the development of these languages practical is given. One of the high-level languages – CLIPS – is compared with natural programming languages. A monograph in Russian devoted to the natural language interfaces is reviewed.Рассматривается ряд научных статей, посвященных вопросам программирования на языках, приближенных к естественному. Дается описание классических подходов к созданию естественных языков программирования и новых подходов, которые сделали разработку таких языков практичнее. Приводится сравнение одного из языков высокого уровня – CLIPS с естественными языками программирования. Анализируется монография на русском языке, посвященная естественно-языковым интерфейсам

    LSTM Based Source Code Generation for Turkish Pseudo Code of Algorithm

    Get PDF
    Algorithmic thinking and programming abilities of students is controversial and popular issue in technological education programs in schools and universities. Students that have not best mathematical and analytical background may have difficulties in learning computer programing. Moreover, learning programming is highly difficult for a single individual to establish connection between discrete pseudo code of algorithm and source code. Another problem is required time to write a piece of program code. In order to solve this problem, there are some tools that tutor students to get analyze and realize relation between pseudo code and source code. In this study, we propose a deep learning method that is Long Short Term-Memory (LSTM) based source code generator from Turkish pseudo codes. For this purpose, we used Introduction to programming course exams in vocational high school as dataset to train LSTM. When users query a Turkish pseudo code of algorithm, C# source code is generated. In order to measure success of proposed system, generated source code and instructor’s source code is analyzed with text similarity methods. Results show that proposed system is useful for students to learn fundamental programming skills

    Learning to Automatically Solve Algebra Word Problems

    Get PDF
    We present an approach for automatically learning to solve algebra word problems. Our algorithm reasons across sentence boundaries to construct and solve a system of linear equations, while simultaneously recovering an alignment of the variables and numbers in these equations to the problem text. The learning algorithm uses varied supervision, including either full equations or just the final answers. We evaluate performance on a newly gathered corpus of algebra word problems, demonstrating that the system can correctly answer almost 70% of the questions in the dataset. This is, to our knowledge, the first learning result for this task.Battelle Memorial Institute (PO 300662)National Science Foundation (U.S.) (Grant IIS-0835652

    Bringing machine learning and compositional semantics together

    Get PDF
    Abstract Computational semantics has long been seen as a field divided between logical and statistical approaches, but this divide is rapidly eroding, with the development of statistical models that learn compositional semantic theories from corpora and databases. This paper presents a simple discriminative learning framework for defining such models and relating them to logical theories. Within this framework, we discuss the task of learning to map utterances to logical forms (semantic parsing) and the task of learning from denotations with logical forms as latent variables. We also consider models that use distributed (e.g., vector) representations rather than logical ones, showing that these can be seen as part of the same overall framework for understanding meaning and structural complexity
    corecore