<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="237"/><title>Natural Language Programming Using Class Sequential Rules</title><pubinfo>Proceedings of the 5th International Joint Conference on Natural Language Processing,pages 237-245, Chiang Mai, Thailand, November 8 - 13, 2011. ©2011 AFNLP</pubinfo><author surname="Carlos" givenname="Cohan Sujay"><org  name="Aiaioo Labs Bangalore" country="India"/></author></firstpageheader><frontmatter><p><b>Natural Language Programming Using Class Sequential Rules</b></p><p><b>Cohan Sujay Carlos</b></p><p>Aiaioo Labs Bangalore, India</p><p>cohan@aiaioo.com</p></frontmatter><abstract>This paper presents a system for Natural Language Programming using Class Se­quential Rules (CSR). The system recog­nizes a number of procedural primitives and operators. The domain of the system is presently limited to the world of num­bers and operations on numbers. We eval­uate the effectiveness of CSRs at the task of Natural Language Programming using an annotated corpus of programming in­structions in natural language, achieving a precision and recall of 85% and 64% re­spectively. We also compare the perfor­mance of a system trained on annotated data with that of a system using hand­crafted rules. </abstract></header><body><section number="1" title="Introduction"><p>Since the early days of computing, there have been those who have longed for a programming sys­tem wherein the use of a formal symbolism for programming was not strictly necessary. Though high level languages greatly improve the ease of programming, it might be easier for a user to be allowed to communicate with an application in a natural language rather than a formal language with a specialized syntax. Moreover, a significant fraction of the population of the world is not con­versant in the English language or remains unfa­miliar with the Roman alphabet, and for them, a system for programming in their native tongues would be of great benefit. It is also easy to fore­see a future where speech recognition systems are so accurate and robust that users might seek to provide instructions by means of speech to their computers. Thus there seems to be a need for algorithms capable of accepting commands and programming instructions in unconstrained human languages.</p><p>We present a Natural Language Programming system capable of accepting programming com­mands in a natural language, executing them and returning any requested results to the user. It is limited to the domain of real numbers and can be used to write programs to compute the values of various functions of real numbers, or to gener­ate different number series. The system can rec­ognize nine broad categories of procedural prim­itives, some of which are conditionals, loops, as­signments and function calls (imperatives). The complete list of types of procedural primitives with their arity and examples of usage can be found in Table 1.</p><p>We also present and evaluate a novel approach for processing user instructions. Instead of the tra­ditional programming language approach of using a parser to produce a parse tree starting from mod­ules or blocks of programming instructions, we first break up the programming instructions into sentences. We then use a short text classifier to first classify each resulting sentence into one of the categories of primitives listed above. Then we perform entity extraction to obtain as many con­tiguous and non-overlapping word subsequences as the arity of the primitive recognized, and then repeat the process with each of the word subsequences.<page local="2" global="238"/> Our system is capable of learning to rec­ognize programming instructions belonging to the categories described above from an annotated cor­pus. It can also use manually crafted rules for the recognition of commands from sentences in a nat­ural language.</p><table caption="Table 1: Types of Procedural Primitives." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Type</b></p></td><td class="cell"><p><b>Arity</b></p></td><td class="cell"><p><b>Example</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>if</p></td><td class="cell"><p>2 or 3</p></td><td class="cell"><p>If x is 2, say "Hi"</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>unless</p></td><td class="cell"><p>2</p></td><td class="cell"><p>Exit unless x is 2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>while</p></td><td class="cell"><p>2</p></td><td class="cell"><p>While x &lt; 2 ...</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>until</p></td><td class="cell"><p>2</p></td><td class="cell"><p>Till x is 2 add 1 to x</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>continuation</p></td><td class="cell"><p>1</p></td><td class="cell"><p>Also, increment y</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>assignment</p></td><td class="cell"><p>2</p></td><td class="cell"><p>Let x be 1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>imperatives</p></td><td class="cell"><p>0 to oo</p></td><td class="cell"><p>Display x</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>questions</p></td><td class="cell"><p>1</p></td><td class="cell"><p>What is y?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>y/n questions</p></td><td class="cell"><p>1</p></td><td class="cell"><p>Is x equal to 2?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>The output of the above process is a semantic parse of the program. The semantic parses of con­secutive sentences are joined into blocks if con­tinuations are indicated. For example, if the first line is "If x is 3, display x." and the second line is "Also, increment x.", the first line is semanti-cally parsed into "x = 3 =&gt;print(x)." and the sec­ond line is parsed to "also(++x)." Then the two lines are combined to get "x = 3 =&gt;print(x) &amp;&amp; ++x." The semantic parse is also an interlingua representation that can be stored, used to perform an automatic translation of the program from one language to another, or executed to obtain the out­put.</p><p>Mihalcea et al (2006) distinguish the two com­plementary programming tasks of <i>description </i>and <i>proceduralization. </i>The present paper deals with proceduralization, the process of constructing pro­cedures out of steps, blocks, conditionals and loops. Of the procedural primitives listed in Ta­ble 1, the first two are <i>conditional </i>statement prim­itives; the next two are <i>loop </i>primitives; the fifth is used to construct <i>blocks </i>of statements by aggluti­nation; the remainder are primitives for <i>steps.</i></p><p>Imperatives tend to be function calls or com­mands that result in an action or change. Examples of imperatives include calls to "display the value of x" and "Go to the step marked 'Subroutine 1'."</p><p>Wh-questions and yes/no questions have the ef­fect of displaying the value of a variable, literal or expression. Yes/no questions are distinguished from wh-questions because their argument is con­strained to be a boolean expression whereas wh-questions can refer to non-boolean variables, liter­als and expressions.</p><p>The set of expressions supported by the system is listed in Table 2. It will be observed that many commonly used mathematical operations like ex­ponentiation and logarithms are not included in the list. The list does however include the arithmetic and relational operators that have their own key­words in the C, C++ and Java programming lan­guages. At present, only two of the logical opera­tors, namely <i>or </i>and <i>and, </i>are supported.</p><p>The rest of this paper is organized as follows:</p><p>Section 2 presents related work on the topic ofnat-ural language programming. The annotated cor­pus used to evaluate the system and the annota­tion guidelines for the same are presented in Sec­tion 3. Section 4 describes the entity recognition algorithms in some detail. The entity recognition systems are evaluated in Section 5 on the anno­tated corpus, and the novel approach of training a natural language programming system from anno­tated text is compared with the approach of using manually crafted rules. The conclusions and fu­ture directions are presented in Section 6.</p></section><section number="2" title="Related Work"><p>Attempts to develop natural language program­ming systems have been made in the past, and a working prototype called "NLC" was described by Ballard and Biermann (1979). NLC was capable of accepting English commands in the imperative mood. It did not accept declaratives and interrog­atives. Each input was required to begin with an imperative verb. However, NLC was capable of dealing with pronominal references, like the ones in the command "Put the average of the first four entries in that row into its last entry" and with pro­cedure definitions and loops, though not with con­ditionals. A sample NLC program from Ballard and Biermann (1979) is provided in Table 3. An example of a looping instruction in NLC is the last line of the sample program that instructs the com­puter to repeat the preceding steps over other rows of the matrix under consideration. Biermann et "Choose a row in the matrix" "Divide its last entry by 3" "Repeat for the other rows" al (1983) also described attempts to provide com­mands to the NLC system using the Nippon Elec­tric DP-200 Connected Speech Recognizer.<page local="3" global="239"/></p><table caption="Table 2: Expressions." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Expression</b></p></td><td class="cell"><p><b>Arity</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>addition</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>subtraction</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>multiplication</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>division</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>modulus</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>divisible</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>equality</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>inequality</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>less than</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>less than or equal to</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>greater than</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>greater than or equal to</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>conjunction</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>disjunction</p></td><td class="cell"><p>2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>negation</p></td><td class="cell"><p>1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table caption="Table 3: Sample NLC Program."></table><table caption="Table 4: Sample Pegasus Program."></table><p>Knoell and Mezini (2006) described a program­ming language called Pegasus that lets users pro­gram using plain German or English statements. Pegasus uses a handcrafted phrase structure gram­mar to parse English or German language com­mands and convert them into an intermediate rep­resentation. The intermediate representation is turned into a Java program using a dictionary of code snippets or translated into a different lan­guage. Knoell and Mezini (2006) did not perform an evaluation of the system on a corpus of natural language programming commands. A sample pro­gram written in the Pegasus language (see Table 4) was provided in the paper to show what a Pegasus program to sort an array of numbers would look like.</p><p>Objections to Natural Language Programming have been recorded, most notably by Dijkstra (1978) in an article titled 'On the Foolishness of "Natural Language Programming"'. Knoell and Mezini (2006) on the other hand opine that a sys­tem capable of dealing with both, formal symbol­ism and natural text, might be better than one that only understands either.</p><p>A system for generating program skeletons from the text of programming assignments like the one shown in Table 5 was described by Mihalcea et al (2006). The system did not attempt to gener­ate an executable program.</p><p>Pane and Myers (2000) studied how non-programmers would describe solutions to prob-</p><p>Write a program to generate 1000 numbers between 0 and 99 inclusive. You should count how many times each number is generated and write these counts out to the screen.</p><table caption="Table 5: Programming Assignment."></table><p>lems arising within a Pacman game, and from their study, Pane and Myers (2001) proposed several principles of usability for developing a program­ming system for children. Lieberman and Liu (2006) examine mixed-initiative dialog as a way of more precisely ascertaining user intention with respect to programming commands, again in the context of the Pacman game.</p><p>The present work is also related to the area of natural language understanding. Shapiro (2001) describes a system that understands user state­ments about their beliefs about the world. This is in essense a form of descriptive programming, similar to that described in Lieberman and Liu (2005) who explore the possibility of using nat­ural language descriptions as a representation for programs, and describe a system called "Metafor" capable of generating Python scaffolding (referred to as the visualization code) from them, though not fully specified programs.</p><p>There has been, to our knowledge, no prior at­tempt to measure the performance of a natural lan­guage programming system using a corpus of an­notated programming statements in a natural lan­guage. There has also not been, to our knowledge, any prior attempt to use entity recognition on nat­ural language commands to generate fully speci­fied programs. We also believe that this is the first attempt to learn patterns of language for program­ming from an annotated corpus.</p></section><section number="3" title="Data Set"><p>At the time of writing, there was no corpus avail­able for evaluating the performance of a sys­tem for procedural programming in a natural lan­guage. Therefore, a corpus was developed<footnote anchor="1"/> con­sisting of sentences in the English language, which the contributors of the sentences perceived to be commands that ought to invoke the programming primitives listed in Table 1 or specify the expres­sions listed in Table 2.</p><footnote label="1">The annotated corpus can be downloaded from the URL http://www.aiaioo.com/corpora/vaklipi2011 .</footnote><p>Take the array [3, 5, 7, 4, 6, 2, 1].</p><p>Count from one up to the size of the array:</p><p>Go over the array from the beginning to the end minus the counter:</p><p>If the current element is bigger than the following element then exchange the current element with the following element.</p><p>Print "After: " and print the array.</p><page local="4" global="240"/><p>The sentences were collected by setting up an online survey on a website, sending out requests over social networks and using email. All the questions were presented to the user at the same time, and the instructions at the top said:</p><p>Please type into the box under each of the following, one way of saying the same thing in English and click on the Submit link below it. You can repeat­edly enter different phrases if you can think of many ways of saying the same thing. For example, to communicate the idea of x = y, you might say x and <i>y </i>are equal or assign the value y to x.</p><p>The survey consisted of a total of thirty ques­tions, and took approximately thirty minutes to complete. All users were presented with the same set of questions and in the same order. The an­swers provided by previous users were not made available to subsequent survey takers.</p><p>A total of 3,517 sentences<footnote anchor="2"/> was collected over a period of one month.</p><p>The annotation procedure involved recategoriz-ing the submissions according to the procedural primitive or expression they most closely matched and marking the entity spans according to the fol­lowing annotation rules:</p><p><b>• Conditional primitives: </b>A complex sen­tence specifying a condition for performing an action is a conditional statement. It is classified as an <i>if conditional statement </i>if it is conditional upon a <b>positive </b>outcome of the conditioning expression and the action to be taken does not undeniably suggest repeat­edly checking the conditioning expression as a precondition for performing the action. It is</p><footnote label="2">The number 3,517 included blank sentences and names as well. When these were removed, we were left with about 3,100 sentences of which we annotated 3,000.</footnote><p>classified as an <i>unless conditional statement </i>if it is conditional upon a <b>negative </b>outcome of the conditioning expression.</p><p><b>• Operations with side effects: </b>Requests to add a value to a variable or to subtract a value from a variable are considered increment and decrement operations if the value of the vari­able would normally be considered to have changed at the end of the operation. For ex­ample, "Add 2 to x" would be considered an increment operation, whereas "Add x to 2" would not. The latter would be considered an addition operation and not an increment op­eration since it does not suggest a change in the value of x whereas the former does.</p><p><b>• Operations without side effects: </b>Sentences in the indicative mood, informative clauses and phrases are classified as operations that do not have side effects, if they are not ex­pected to alter the value of a variable. For example, "x added to 5" and "x by 5" have no side effects.</p><p><b>• Relational Operations: </b>The classification of relational operations like <i>less than </i>depends on the order in which the parameters are sup­plied. So, "x is less than 2" and "x is not greater than or equal to 2" are both valid ways of representing "x &lt; 2", but not "2 is greater than x". The last example is classified as a <i>greater than </i>operator.</p><p>From the counts for the categories <i>if condi­tional statement </i>(95 before annotation and 118 af­ter cleaup) and the <i>unless conditional statement </i>(64 before and 15 after) it appears to be the case that people strongly prefer using an <i>ifconditional statement </i>to an <i>unless conditional statement. </i>Thus the number of test sentences in each of the cate­gories is not balanced.</p><p><b>• Loop primitives: </b>A complex sentence speci­fying a condition that is repeatedly evaluated for performing an action until it is satisfied </p><p>or denied is a loop statement. It is classified as a <i>while loop statement </i>if it is conditional upon a <b>positive </b>outcome of the conditioning expression. It is classified as an <i>until loop statement </i>if it is conditional upon a <b>negative </b>outcome of the conditioning expression.</p><table caption="Table 6: Survey Questions." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Order</b></p></td><td class="cell"><p><b>Survey Question</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p></td><td class="cell"><p>How would you say "x = 2" in English?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>2</p></td><td class="cell"><p>How would you say "x != 2" in English?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>4</p></td><td class="cell"><p>How would you say "x &lt; 2" ?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>6</p></td><td class="cell"><p>How would you say "x &gt; 2" ?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>9</p></td><td class="cell"><p>How would you say "x multiplied by 2" ?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>10</p></td><td class="cell"><p>How would you say "x / 2" ?</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="5" global="241"/></section><section number="4" title="System Description"><p>As the system is intended for use as a multilin­gual teaching tool for students of computer pro­gramming, especially for those who do not pos­sess a knowledge of English or the Roman al­phabet, it was thought desirable to use a method of processing natural language programming in­structions that would permit the rules for process­ing instructions to be learnt from annotated text in a number of possibly very different human lan­guages.</p><p>One approach that seemed very promising was Class Sequential Rules (CSR) as described by Hu and Liu (2006). CSRs have been shown to out­perform existing methods at the task of associ­ating opinions with product features (Liu et al, 2006). Moreover, CSRs can also be easily created by hand since they are a subset ofcascading gram­mar rules such as those described by the Com­mon Pattern Specification Language (CPSL) (Ap-pelt, 1996), which incidentally was developed as a language for specifying finite-state grammars for the purpose of information extraction. It was intu­itively felt that a less powerful formalism might not only suffice for the task of processing pro­gramming commands, but also prove learnable from an annotated corpus.</p><subsection number="4.1" title="Class Sequential Rules"><p>A Class Sequential Rule consists of a sequence of ordered tokens, that we indicate by the symbols ii... in, for example, I = &lt; 2122*3 &gt;. A CSR matches a sentence only when each token in the CSR's token sequence matches a word token in the text under evaluation, in the right order. The CSR I will match a sentence s if and only if, in the sentence, there is a token s3 that matches i3, and this token follows a token s2 that matches i2. This second token must in turn follow a token s1that matches i1. For example, I will match the se­quence &lt; iix3i2x4i3x5 &gt; but not &lt; i2i3 &gt; or &lt; i3i2i1 &gt;. CSRs like I can be used for classifi­cation as follows: a number of mutually exclusive CSRs are assigned to each class and used in con­junction with a priority or ordering scheme to re­solve conflicts when CSRs from different classes match the input.</p><p>CSRs can also have class labels c1... <i>cn </i>in their sequences. A class label can match zero or more tokens in the sentence. The tokens that class la­bels match represent entites in the sentences when <b>Sequences</b></p><doubt alpha="50.0" length="10" tooSmall="False" monospace="0.0">&lt; c2keab &gt;</doubt><doubt alpha="44.4" length="9" tooSmall="False" monospace="0.0">&lt; dc2kb &gt;</doubt><table caption="Table 7: Sequence database."></table><p>CSRs are used for entity extraction. For example, the CSR J =&lt; i1c4i2c5 i3 &gt; will match the sen­tence &lt; i1x3x4i2i3 &gt;. The two class labels in J, namely c4 and c5 will at the same time match the sub-sequence &lt; x3x4 &gt; and the empty se­quence &lt;&gt; respectively. As you can see, the ac­tual matching is performed by the sequence tokens i1... in. The class labels pick up the tokens in be­tween.</p><p>If two class labels follow one another in quick succession (are not separated by a token in the se­quence), for example &lt; i1c2c3i4 &gt;, the extents of their spans are not well defined. The tokens that class labels match can be thought of as entities. Thus, in addition to classification, CSRs can be said to be capable of performing entity extraction.</p><p>The task of understanding a programming com­mand given in natural language can be broken down into the two sub-tasks that CSRs perform: a) classifying the command into one of several cate­gories of commands; and b) extracting the argu­ments for further processing. Both tasks can be performed by CSRs in a single step.</p><p>The algorithm for mining CSRs used in the present work is described in more detail in Hu and Liu (2006). Using the algorithm, it is possi­ble to mine sequences with a given minimum <i>sup­port. </i>For instance, given two sequences such as those shown in Table 7, and a minimum required support of 2, it is possible to extract all the pat­terns of length 1, 2 and 3 indicated in Table 8. CSRs are only a special case of sequential pat­terns. With CSRs, the sequential patterns mined are text tokens. Some algorithms for sequential pattern mining have been studied in Agrawal and Srikant (1995).</p><p>Other pattern exraction concepts closely related to CSRs include the surface patterns described by <b>Sequences</b><page local="6" global="242"/></p><table caption="Table 8: Extracted sequences with support 2." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Length</b></p></td><td class="cell"><p><b>Sequences</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p></td><td class="cell"><p>&lt; C2 &gt;</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>2</p></td><td class="cell"><p>&lt; C2k &gt;</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>3</p></td><td class="cell"><p>&lt; &gt;</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>Also { <i>x</i><i> </i><i>=</i><i> </i><i>2</i><i> </i><i>}.</i><i> </i>Also, { x = 2 }. Also { if x = 3 , ++x }.</p><p>Table 9: Three annotated sentences that demon­strate the inadequacy of CSRs for natural language programming.</p><p>Ravichandran and Hovy (2002), Hearst (1992), Snow et al (2005) and Lin and Pantel (2001).</p><p>In the course of developing a hand-crafted set of rules for natural language programming us­ing CSRs, it was observed that the discriminative power of CSRs did not always suffice. For ex­ample, it was observed that CSRs could not ac­curately identify the entity spans in the three sen­tences listed in Table 9.</p><p>The reason is that the two rules in Table 10 are needed to match the spans in the first two sen­tences and these are ordered to fire one behind the other as shown in the table. Now, however, the first rule "Also , EXPRESSION ." incorrectly picks out the single entity span in the third sentence owing to the comma in the middle of the sentence, and there is no way to rectify the problem using a dif­ferent number of CSRs or changing the ordering.</p><p>Thus, a family of rules with more discriminative power was needed. We attempted to extend the concept of CSRs to give them more discriminative power, as described in the next subsection.</p></subsection><subsection number="4.2" title="Extended Class Sequential Rules"><p>The extension that solved the problem described in the preceding section was that of allowing each token in the CSR to be an n-gram. The rules pre­sented in Table 11 contain a special term "NONE" which indicates an n-gram constraint as follows:</p><p>• When the term "NONE" appears between two tokens, the tokens they match in a sen­tence must be consecutive tokens. This is equivalent to making tokens on either side of "NONE" part of an n-gram. In the example in Table 11, the first rule can only match sen­tences where a comma immediately follows the word "Also."</p><p>• The term "NONE" can also appear at the be­ginning of an extended CSR to indicate that the following token must appear at the begin­ning of the matched sentence.</p><p>• Similarly, it can appear at the end of an ex­tended CSR to indicate that the preceding to­ken can only appear as the last token of a matched sentence.</p><p>The set of rules in Table 11 will be seen to be able to match all three sentences' spans correctly.</p></subsection><subsection number="4.3" title="Rule Selection and Ordering"><p>The two parameters used to evaluate the suitability of a rule are <i>support </i>(the percentage the sentences belonging to a category that it correctly identifies as belonging to that category) and <i>confidence </i>(the percentage of matches of the rule that were right), which are analogous to precision and recall. Only those rules were selected whose support and con­fidence values on the training data both exceeded minimum thresholds. The selected rules were or­dered as follows:</p><p>• Rules whose accuracy of span matching ex­ceeded the threshold were placed first.</p><p>• Rules whose accuracy of span matching fell below the threshold followed.</p><p>• Within the two categories described above, longer rules went ahead of shorter rules.</p></subsection><subsection number="4.4" title="Intermediate Representation"><p>The intermediate representation is a programming language that mimics the ambiguities of the lan­guage used in mathematics. The intermediate rep­resentation differs from a conventional program­ming language like Python in the following ways:</p><p>• Terms which tend to be ambiguous in nat­ural language remain so in the intermediate representation. For example, the 'assignment operator' doubles as the 'equal to operator'</p><table caption="Table 10: Class Sequential Rules for the entity spans in Table 9." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Order</b></p></td><td class="cell"><p><b>CSRs</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p><p>2</p></td><td class="cell"><p>Also , EXPRESSION . Also EXPRESSION .</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table caption="Table 11: Two CSRs of the extended variety." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Order</b></p></td><td class="cell"><p><b>Extended CSRs</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p><p>2</p></td><td class="cell"><p>Also NONE , EXPRESSION . Also EXPRESSION .</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="7" global="243"/><p>Let x be 3. y is 9.</p><p>What is x times y?</p><p>While x is less than y, print x and then increment x.</p><table caption="Table 12: Sample commands in our system."></table><p>in many natural languages. This overloading poses no problem since the right form can be resolved from context.</p><p>• The intermediate representation also attempts to capture the logical operator priority of In­dian languages. In many Indian languages, it is not possible to set <i>or</i>-phrases as sub­phrases of and-phrases. So, we have chosen a priority order for operations in the interme­diate representation that naturally maintains the restriction.</p><p>A program written in the present system would look like that in Table 12.</p></subsection></section><section number="5" title="Evaluation and Results"><p>The natural language programming system was evaluated against the annotated corpus described in Section 3. The manual rules used in the eval­uation were developed and fixed prior to the start of corpus collection to avoid the introduction of biases through any knowledge of the corpus to be tested on.</p><subsection number="5.1" title="Categories"><p>The categories that were used in testing were equality, inequality, less than, greater than, less than or equal to, greater than or equal to, addi­tion, subtraction, multiplication, division, incre­ment, decrement, if, while, unless, until, print, conjunctive, disjunctive, divisible and continua­tion.</p><p>The categories in the corpus that were left out of the evaluation were as follows:</p><p>• Three categories were left out because of the lack of manually crafted rules for those cate­gories.</p><p>• Of the three categories recognized as the print command by the manual rules, only one was retained for the experiment.</p><p>• Two of the omitted categories were merely synomyms for boolean constants 'true' and</p><doubt alpha="62.5" length="8" tooSmall="False" monospace="0.0">'false.'</doubt><p>• The modulus operator was left out of the evaluation because the manual rules treated the operator as 'modulus' whereas the ques­tion used in the survey used to develop the corpus had suggested that the operator was the 'absolute value' operator.</p></subsection><subsection number="5.2" title="Experiments"><p>The 3,000 sentences in the annotated corpus be­long to 29 distinct categories of which 21 are used for evaluating the system. Support and confidence values of 0.0001 and 0.70<footnote anchor="3"/> respectively were used during training (for rule discovery).</p><p>Since we performed 3-fold cross validation, three sets of experiments were conducted for each of the following settings, for a total of 9 experi­ments in all:</p><p>• Conventional CSRs (CSR-BL)</p><p>• Extended CSRs (CSR-EX)</p><p>• Manually crafted rules (CSR-Man)</p><footnote label="3">These values were manually chosen keeping in mind the small size of the corpus. The support threshold was chosen to be low enough to not affect rule selection. The confidence threshold was kept low enough to permit single failures (in­correct matches) from time to time.</footnote><table caption="Table 13: Evaluation ofCSR-EX." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Category</b></p></td><td class="cell"><p><b>Cnt</b></p></td><td class="cell"><p><b>Precision</b></p></td><td class="cell"><p><b>Recall</b></p></td><td class="cell"><p><b>F1</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>equality</p></td><td class="cell"><p>298</p></td><td class="cell"><p>79.0 ± 06</p></td><td class="cell"><p>66.5 ± 19</p></td><td class="cell"><p>71.9 ± 10</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>inequality</p></td><td class="cell"><p>165</p></td><td class="cell"><p>90.6 ± 14</p></td><td class="cell"><p>78.6 ± 06</p></td><td class="cell"><p>84.3 ± 09</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>less than</p></td><td class="cell"><p>151</p></td><td class="cell"><p>66.8 ± 10</p></td><td class="cell"><p>88.4 ± 07</p></td><td class="cell"><p>76.8 ± 08</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>&lt;</p></td><td class="cell"><p>137</p></td><td class="cell"><p>99.1 ± 02</p></td><td class="cell"><p>75 ± 13</p></td><td class="cell"><p>86.0 ± 07</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>more than</p></td><td class="cell"><p>158</p></td><td class="cell"><p>76.6 ± 08</p></td><td class="cell"><p>83.1 ± 06</p></td><td class="cell"><p>79.6 ± 02</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>&gt;</p></td><td class="cell"><p>132</p></td><td class="cell"><p>92.9 ± 05</p></td><td class="cell"><p>80.8 ± 13</p></td><td class="cell"><p>86.5 ± 09</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>addition</p></td><td class="cell"><p>140</p></td><td class="cell"><p>97.9 ± 04</p></td><td class="cell"><p>61.2 ± 10</p></td><td class="cell"><p>77.2 ± 06</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>subtract</p></td><td class="cell"><p>113</p></td><td class="cell"><p>92.5 ± 15</p></td><td class="cell"><p>71.0 ± 06</p></td><td class="cell"><p>80.8 ± 06</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>multiply</p></td><td class="cell"><p>144</p></td><td class="cell"><p>98.8 ± 02</p></td><td class="cell"><p>64.1 ± 12</p></td><td class="cell"><p>79.4 ± 08</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>division</p></td><td class="cell"><p>143</p></td><td class="cell"><p>89.8 ± 10</p></td><td class="cell"><p>69.8 ± 08</p></td><td class="cell"><p>79.2 ± 09</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>increment</p></td><td class="cell"><p>136</p></td><td class="cell"><p>92.5 ± 08</p></td><td class="cell"><p>57.3 ± 08</p></td><td class="cell"><p>72.8 ± 08</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>decrement</p></td><td class="cell"><p>131</p></td><td class="cell"><p>96.9 ± 06</p></td><td class="cell"><p>23.5 ± 15</p></td><td class="cell"><p>46.7 ± 15</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>if</p></td><td class="cell"><p>118</p></td><td class="cell"><p>84.2 ± 05</p></td><td class="cell"><p>96.0 ± 08</p></td><td class="cell"><p>89.8 ± 04</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>while</p></td><td class="cell"><p>61</p></td><td class="cell"><p>92.1 ± 02</p></td><td class="cell"><p>88.0 ± 12</p></td><td class="cell"><p>89.8 ± 11</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>unless</p></td><td class="cell"><p>15</p></td><td class="cell"><p>100 ± 00</p></td><td class="cell"><p>60.7 ± 15</p></td><td class="cell"><p>77.6 ± 09</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>until</p></td><td class="cell"><p>86</p></td><td class="cell"><p>98.8 ± 02</p></td><td class="cell"><p>85.8 ± 15</p></td><td class="cell"><p>91.9 ± 08</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>print</p></td><td class="cell"><p>82</p></td><td class="cell"><p>92.3 ± 06</p></td><td class="cell"><p>33.9 ± 14</p></td><td class="cell"><p>55.1 ± 09</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>and</p></td><td class="cell"><p>68</p></td><td class="cell"><p>52.8 ± 11</p></td><td class="cell"><p>82.8 ± 14</p></td><td class="cell"><p>66.1 ± 12</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>or</p></td><td class="cell"><p>67</p></td><td class="cell"><p>92.1 ± 08</p></td><td class="cell"><p>37.8 ± 04</p></td><td class="cell"><p>58.8 ± 03</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>divisible</p></td><td class="cell"><p>66</p></td><td class="cell"><p>92.7 ± 08</p></td><td class="cell"><p>71.1 ± 18</p></td><td class="cell"><p>80.7 ± 10</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>continue</p></td><td class="cell"><p>48</p></td><td class="cell"><p>78.3 ± 23</p></td><td class="cell"><p>22.1 ± 11</p></td><td class="cell"><p>40.0 ± 05</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="8" global="244"/><p>In all experiments, the Precision, Recall and F1 Score (the harmonic mean of Precision and Re­call) were measured for each of the categories, as well as the overall accuracy of categorization. The Precision, Recall and F1 scores for the CSR-EX algorithm are presented in Table 13. In the second column of the table is listed the number of sen­tences used in the test. This value in some cases drops to as low as fifteen sentences. The confi­dence intervals are rather high, making it difficult to draw comparisons between algorithms based on this data. The average of these scores for all cate­gories is reported in Table 14.</p><p>The accuracy of entity span boundary detec­tion is measured as follows: A recall-based score for correct span detection is computed by dividing the number of sentences with perfectly identified spans by the number of sentences in the category. This score is reported as the PSCS (percentage of sentences with correct spans). This score is simi­lar to but not quite the same as the PCS (percent­age of correct scopes) metric used in Councill et al (2010).</p><p>The PSCS scores for the three algorithms are reported in Table 15. We observe from the results that for the corpus the evaluation was performed on, there is no significant difference between the algorithms evaluated.</p><p>The overall accuracy scores presented in Ta­ble 16 again reveal no significant differences be­tween CSR-Man, CSR-BL and CSR-EX in their behaviour with respect to the data-set.</p></subsection></section><section number="6" title="Conclusions and Future Work"><p>This paper presents a system for Natural Language Programming capable of recognizing a number of categories of procedural programming instruc­tions in a natural language. The system uses Class Sequential Rules to convert a natural language rep­resentation of a program into an intermediate rep­resentation that can be executed. The system is capable of using manually crafted rules or rules learnt from an annotated corpus.</p><p>Since no corpus was available for evaluation of a system for Natural Language Programming, a corpus consisting of 3,000 sentences in twenty-nine categories (of which only twenty-one were used), was collected over the internet, cleaned, re-categorized, annotated with entity spans and made publicly available.</p><p>Since the existing formalism of Class Sequen­tial Rules (CSR-BL) was not powerful enough to tease certain sets of sentences apart into the right categories, an extension to Class Sequential Rules was proposed (CSR-EX) and implemented.</p><p>Finally, the system was evaluated by three-fold cross validation using the corpus. Three settings of the system were tested: a) a setting where it used extended CSR-EX rules manually crafted be­fore the collection of the corpus; b) a setting where it used CSR-BL rules learnt from the annotated corpus; and c) a setting where it used CSR-EX rules learnt from the annotated corpus. Precisions of around 85% and recalls of approximately 64% were measured with confidence intervals as large as 7%. The large confidence intervals make it impossible to establish if one of the approaches works better than the others with the present cor­pus and the present set of categories.</p><p>Future research could include an evaluation on a larger corpus, on more languages and on the sys­tem's ability to adapt to new domains. It would also be interesting to examine system accuracies with an increased number of categories covering more operations and functions. It might also be of interest to build a corpus of complete programs rather than individual sentences, to capture more variations in language.</p></section><section title="Acknowledgments"><p>We are very grateful to all the volunteers who con­tributed to the corpus and to Govind Sharma, Kar-tik Asooja, Dr. Pushpak Bhattacharyya and the reviewers for helpful suggestions and references.</p><table caption="Table 14: Categorization Evaluation." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Setting</b></p></td><td class="cell"><p><b>Prec.</b></p></td><td class="cell"><p><b>Recall</b></p></td><td class="cell"><p><b>F1</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>CSR-Man</p><p>CSR-BL</p><p>CSR-EX</p></td><td class="cell"><p>89.2 ± 3.7 85.7 ± 4.5 88.4 ± 3.4</p></td><td class="cell"><p>64.8 ± 6.2 65.3 ± 5.9 66.5 ± 5.6</p></td><td class="cell"><p>73.0 ± 4</p><p>73.1 ± 4 74.8 ± 3</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table caption="Table 15: Entity Span Matching Evaluation." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Metric</b></p></td><td class="cell"><p><b>CSR-Man</b></p></td><td class="cell"><p><b>CSR-BL</b></p></td><td class="cell"><p><b>CSR-EX</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>PSCS</p></td><td class="cell"><p>52.4 ± 9.1</p></td><td class="cell"><p>50.2 ± 8.4</p></td><td class="cell"><p>49.7 ± 8.6</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table caption="Table 16: Accuracies." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>Metric</b></p></td><td class="cell"><p><b>CSR-Man</b></p></td><td class="cell"><p><b>CSR-BL</b></p></td><td class="cell"><p><b>CSR-EX</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Acc.</p></td><td class="cell"><p>64.3 ± 7</p></td><td class="cell"><p>64.4 ± 6</p></td><td class="cell"><p>66.0 ± 4</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="9" global="245"/></section><references><p>Rakesh Agrawal and Ramakrishnan Srikant. 1995.</p><p><i>Mining Sequential Patterns. </i>In <i>Proceedings of the Eleventh International Conference on Data Engi­neering IEEE Computer Society Washington, DC, USA. 1995.</i></p><p>Douglas E. Appelt. 1996. <i>The Common Pattern Spec­ification Language. </i>In <i>Proceedings of a workshop on held at Baltimore, Maryland. 1996, </i>23-30.</p><p>Bruce W. Ballard, Alan W. Biermann. 1979. <i>Program­ming in Natural Language: "NLC" as a prototype. Proceedings of the 1979 annual conference. 1979, </i>228-237.</p><p>Alan W. Biermann, R. Rodman, Bruce W. Ballard, T. Betancourt, G. Bilbro, H. Deas, L. Fineman, P. Fink, K. Gilbert, D. Gregory, F. Heidlage. 1983. <i>Inter­active natural language problem solving: a prag­matic approach. </i>In <i>ANLC '83, Proceedings of the first conference on Applied Natural Language Pro­cessing, 1983.</i></p><p>Isaac G. Councill , Ryan McDonald , Leonid Ve-likovich. 2010. <i>Whats Great and Whats Not: Learning to Classify the Scope ofNegation for Im­proved Sentiment Analysis. </i>In <i>Proceedings ofthe Workshop on Negation and Speculation in Natural Language Processing (NeSp-NLP 2010). 2010.</i></p><p>Edsger W. Dijkstra. 1978. <i>On the foolishness of "Nat­ural Language Programming". </i>In <i>Program Con­struction. 1978, </i>51-53.</p><p>Marti A. Hearst. 1992. <i>Automatic Acquisition of Hy-ponyms from Large Text Corpora. </i>In <i>Proceedings of the 14th conference on Computational Linguistics -Volume 2. 1992.</i></p><p>Minqing Hu and Bing Liu. 2006. <i>Opinion Feature Ex­traction Using Class Sequential Rules. AAAI Spring Symposium on Computational Approaches to Ana­lyzing Weblogs, Palo Alto, USA, March 2006.</i></p><p>Roman Knoell and Mira Mezini. 2006. <i>Pega­sus First Steps Toward a Naturalistic Programming Language. </i>In <i>Companion to the 21st ACM SIG-PLAN symposium on Object-oriented programming systems, languages, and applications. 2006, </i>542­559.</p><p>Henry Lieberman and Hugo Liu. 2005. <i>Metafor: Visu­alizing stories as code. </i>In <i>10th International Con­ference on Intelligent User Interfaces. 2005.</i></p><p>Henry Lieberman and Hugo Liu. 2006. <i>Feasibil­ity studies for programming in natural language. Lieberman, Paterno, Wulf(Eds.): End-User Devel­opment (Human-Computer Interaction Series Vol.</i></p><p><i>9), Springer, 2006, </i>459-474.</p><p>Dekang Lin and Patrick Pantel. 2001. <i>Discovery of inference rules for question-answering. </i>In <i>Journal</i> <i>Natural Language Engineering archive Volume 7 Is­sue 4, Cambridge University Press New York, NY,</i> <i>USA.</i><i> December 2001.</i></p><p>Bing Liu, Minqing Hu and Junsheng Cheng. 2005.</p><p><i>Opinion Observer: Analyzing and Comparing Opin­ions on the Web. </i>In <i>Proceedings ofthe 14th Inter­national World Wide Web conference (WWW-2005), Chiba, Japan. 2005.</i></p><p>Rada Mihalcea and Hugo Liu and Henry Lieberman. 2006. <i>NLP (Natural Language Processing) for NLP (Natural Language Programming). </i>In <i>Proceedings ofCICLing. 2006, </i>319-330.</p><p>John F. Pane and Brad A. Myers. 2000. <i>The Influ­ence ofthe Psychology ofProgramming on a Lan­guage Design: Project Status Report. </i>In <i>Proceed­ings ofthe 12th Annual Meeting ofthe Psychology ofProgrammers Interest Group, A. </i><i>F.</i><i> Blackwell and E. Bilotta, Eds. Corigliano Calabro, Italy: Edizioni Memoria, April 10-13 2000, </i>193-205.</p><p>John F. Pane, Chotirat Ann Ratanamahatana and Brad A. Myers. 2001. <i>Studying the language and structure in non-programmers' solutions to programming problems. </i>In <i>International Journal of Human-Computer Studies Volume 54, Issue 2, February 2001,237-264.</i></p><p>Deepak Ravichandran and Eduard Hovy. 2002. <i>Learn­ing Surface Text Patterns for a Question Answering System. </i>In <i>Proceedings </i><i>ofthe</i><i> 40th Annual Meet­ing </i><i>ofthe</i><i> Association for Computational Linguis­tics, 2002.</i></p><p>Stuart C. Shapiro. 1989. <i>The CASSIE Projects: An Approach to Natural Language Competence. EPIA,</i> <i>1989, </i>362-380.</p><p>Rion Snow, Daniel Jurafsky, Andrew Y. Ng. 2005.</p><p><i>Learning Syntactic Patterns for Automatic Hyper-nym Discovery. </i>In <i>Advances in Neural Information Processing Systems 17. 2005, </i>1297-1304.</p></references></body></article>