<?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="80"/><title>An Update on PENG Light</title><author surname="White" givenname="Colin"><org  name="Mie University" country="Japan" city="Mie"/></author><author surname="Schwitter" givenname="Rolf"><org  name="Macquarie University" country="Australia" city="Sydney"/></author></firstpageheader><frontmatter><p><b>An Update on PENG Light</b></p><p><b>Colin White</b></p><p>Department of Computing Macquarie University Sydney NSW 2109, Australia</p><p>colcwhite@gmail.com</p><p><b>Rolf Schwitter</b></p><p>Centre for Language Technology Macquarie University Sydney NSW 2109, Australia Rolf.Schwitter@mq.edu.au</p></frontmatter><abstract>This paper presents an update on PENG Light, a lightweight and portable controlled natural language processor that can be used to translate a well-defined subset of En­glish unambiguously into a formal target language. We illustrate by example of a Firefox extension that provides a simple in­terface to the controlled natural language processor how web pages can be annotated with textual information written in con­trolled natural language and how these an­notations can be translated incrementally into first-order logic. We focus in partic­ular on technical aspects of the controlled language processor and show in detail how look-ahead information that can be used to guide the writing process of the author is generated during the parsing process. Ad­ditionally, we discuss what kind of user interaction is required for processing un­known content words. </abstract></header><body><section number="1" title="Introduction"><p>Computer-processable controlled natural lan­guages are well-defined and tractable subsets of natural languages that have been carefully de­signed to avoid constructions that may cause am­biguities (Fuchs et al., 1998; Schwitter, 2002; Sowa, 2004; Barker et al., 2007). Instead of encoding a piece of knowledge in a formal lan­guage that is difficult to understand for humans, a controlled natural language can be used to ex­press the same information in a direct way using the vocabulary of the application domain. There is no need to formally encode this information since a computer-processable controlled natural language can be translated automatically and un­ambiguously into a formal target language by a machine. This has the advantage that everybody who knows English can understand a text writ­ten in controlled natural language and that a ma­chine can process this text since it corresponds to a formal notation. In order to support the writ­ing of these texts, text- and menu-based predic­tive editing techniques have been suggested that guide the writing process of the author (Tennant et al., 1983; Schwitter et al., 2003; Thompson et al., 2005; Kuhn, 2008). These techniques give the author a way to match what he or she wants to express with the processing capabili­ties of the machine and result in user-friendly and self-explanatory interfaces. However, prac­tically no details have been published so far how these predictive techniques can actually be imple­mented in a controlled natural language proces­sor that processes a text incrementally. In this pa­per, we will make up for this neglect and show how these predictive techniques have been imple­mented for the controlled natural language pro­cessor of PENG Light and discuss how the lan­guage processor uses these techniques while com­municating over an HTTP connection with a sim­ple AJAX-based tool designed for annotating web pages in controlled natural language.</p><p>The rest of this paper is structured as follows: In Section 2, we give a brief overview of exist­ing computer-processable controlled natural lan­guages. In Section 3, we introduce FoxPENG, a simple Firefox extension that we have built for annotating web pages with controlled natural language and use this extension as a vehi­cle for motivating predictive editing techniques.<page local="2" global="81"/> In Section 4, we give a brief introduction to the controlled natural language PENG Light and show how sentences can be anaphorically linked and finally translated into discourse representa­tion structures. In Section 5, we present the lat­est version of the chart parser of PENG Light and focus on the incremental processing of sim­ple and compound words. In Section 6, we dis­cuss what user interaction is required for process­ing unknown content words and suggest a linear microformat for specifying feature structures. In Section 7, we summarise the advantages of our controlled natural language approach for specify­ing a piece of knowledge.</p></section><section number="2" title="Related Controlled Natural Languages"><p>During the last decade, a number of computer-processable controlled natural languages have been designed and used for specification pur­poses, knowledge acquisition and knowledge representation, and as interface languages to the Semantic Web - among them Attempto</p><doubt alpha="64.4" length="45" tooSmall="False" monospace="0.0">Controlled English (ACE) (Fuchs et al., 1998;</doubt><p>Fuchs et al., 2008), Processable English (Schwit-ter, 2002), Common Logic Controlled English (Sowa, 2004), and recently Boeing's Computer-Processable Language (Clark et al., 2005; Clark et al., 2007). Some machine-oriented controlled natural languages require the author to learn a small number of construction and interpretation rules (Fuchs et al., 2008), while other controlled natural languages provide writing support which takes most of the burden of learning and remem­bering the language from the author (Thompson et al., 2005). The commercial success of the human-oriented controlled natural language ASD Simplified Technical English (ASD, 2007) sug­gests that people can learn to work with restricted English and that good authoring tools can drasti­cally reduce the learning curve of the language.</p><p>The language processors of ACE and PENG Light are both based on grammars that are writ­ten in a definite clause grammar (DCG) nota­tion (Pereira and Shieber, 1987). These DCGs are enhanced with feature structures and specif­ically designed to translate declarative and inter­rogative sentences into a first-order logic notation via discourse representation structures (Kamp and Reyle, 1993). In contrast to ACE that uses the DCG directly and resolves anaphoric references only after a discourse representation structure has been constructed, PENG Light transforms the DCG into a format that can be processed by a top-down chart parser and resolves anaphoric ref­erences during the parsing process while a dis­course representation structure is built up.</p></section><section number="3" title="The FoxPENG Toolbar"><p>In order to annotate web pages with informa­tion that is at the same time human-readable and machine-processable, we developed FoxPENG, an AJAX-based Firefox extension (see Figure 1). FoxPENG supports the writing of annotations with the help of look-ahead information that in­dicates what syntactic categories or word forms can follow the current input. This look-ahead in­formation is dynamically generated and updated by the language processor while an annotation is written. This application has some similarities to Google Suggest<footnote anchor="1"/> and other autocomplete mecha-nisms<footnote anchor="2"/> provided by source code editors, database query tools, and command line interpreters.</p><p>In contrast to Google Suggest that guesses what an author writes, the look-ahead information dis­played in FoxPENG is a side-effect of the parsing process of the controlled natural language. Fox-PENG communicates asynchronously with the language processor of PENG Light via a Prolog HTTP server<footnote anchor="3"/> using JSON<footnote anchor="4"/> (JavaScript Object Notation) as data-interchange format.</p><p>Once a connection to the Prolog server has been established, FoxPENG makes a request for the initial look-ahead categories to be displayed along the lower section of the toolbar. The au­thor can now start typing an annotation that be­gins with a word form that falls under the corre­sponding look-ahead categories. Once a simple word form has been entered and the space bar has been pressed, an HTTP request is sent to the lan­guage processor containing the word form as well as the position of the word in the sentence.</p><footnote label="1">http://www.google.com/support/websearch/bin/ans- wer.py?answer=106230 2 http://en.wikipedia.org/wiki/Autocomplete/  3 http://www.swi-prolog.org/packages/http.html  4 http://json.org/</footnote><page local="3" global="82"/><p>The chart parser of PENG Light processes this information and either replies with a set of new look-ahead categories and word forms to choose from or with spelling suggestions in case of an er­ror. The spelling suggestions are derived from the entries in the linguistic lexicon of PENG Light. If a content word is not misspelled and cannot be found in the linguistic lexicon, then the author can specify this word directly in the text area of Fox-PENG using a microformat for linearised feature structures (see Section 6). An annotation can con­sist of more than one PENG Light sentence, and the language processor can resolve anaphoric ref­erences during the writing process using the stan­dard accessibility constraints imposed by the dis­course representation structures (see Section 4). The resulting discourse representation structure can be further translated into the input format of an automated reasoning engine and then be used for various reasoning tasks, among them for ques­tion answering. We have used the theorem prover and model builder E-KRHyper (Baumgartner et al., 2007) as reasoning service for PENG Light.</p><p>The author can publish a FoxPENG annotation as part of an RSS feed that contains a link to the annotated web page. In principle, any RSS feed aggregator can subscribe to such an RSS feed that is written in controlled natural language. This has the benefit that annotations are not only human-readable but also machine-processable (with the help of a PENG-compliant language processor).</p></section><section number="4" title="PENG Light"><p>PENG Light is a computer-processable controlled natural language that can be used for knowledge representation (Schwitter, 2008). At first glance,</p><p>PENG Light <b>looks like </b>a subset of natural lan­guage, but PENG Light is actually a <b>formal </b>lan­guage since the language is designed in such a way that it can be translated unambiguously into a formal target representation. The vocabulary of PENG Light consists of predefined function words (determiners, coordinators, subordinators, prepositions and query words), a small number of predefined phrases (e.g. <i>there is, it is false that) </i>and content words (nouns, proper nouns, verbs, adjectives and adverbs) that can be defined by the author. A PENG text is a sequence of anaphori-cally interrelated sentences that consist of simple and complex sentences.</p><subsection number="4.1" title="Sentences in PENG Light"><p>PENG Light distinguishes between simple, com­plex, and interrogative sentences. Simple sen­tences consist of a subject and a verb (1-6), nec­essary complements (2-5), and optional adjuncts (5+6):</p><p>1. David Miller works.</p><p>2. David Miller teaches COMP249.</p><p>3. David Miller sends a letter to Mary.</p><p>4. David Miller is in the lecture hall.</p><p>5. David Miller teaches COMP249 on Monday.</p><p>6. David Miller works fast.</p><p>Complex sentences are built from simpler sen­tences through quantification (7+8), negation (9­11), subordination (12), and coordination (13):</p><p>7. Every professor teaches a unit.</p><p>8. David Miller teaches [ exactly | at least | at most ] two units.</p><p>9. If is false that a professor teaches COMP225.</p><p>10. No professor teaches COMP225.</p><p>11. David Miller is not a professor.</p><table caption="Figure 1: FoxPENG - Firefox Extension" 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>^i) <b>David Miller - Mozilla Firefox</b></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>File    Edit    View    History    Bookmarks    Tools Help</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><i>%9  </i>- e</p></td><td class="cell"><p><b>^ 1 </b>http://web.science,mq.edu.au/^rolfs/rniller.html          f " <b>I</b></p></td><td class="cell"><p>||G]-|G°°g|e <i>fill</i></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Annotation:    1 David Miller works at Macquarie University. David</p><p>Categories:     auxiliarv: ('does') 1 copula: fis') 1 proper noun: ('Miller') 1 relative pronoun: ('who') 1 verb</p></td><td class="cell"><p>_IL Post to Feed</p><p>FOL Help</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>1 </b>Done</p></td><td class="cell"><p></p></td><td class="cell"><p></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><page local="4" global="83"/><p>12. David who teaches a unit supervises Mary.</p><p>13. David teaches COMP249 and supervises Mary.</p><p>A special form of complex sentences are con­ditionals (14) and definitions (15):</p><p>14. If David Miller works  on Monday then Sue Rosenkrantz works on Tuesday.</p><p>15. A professor is defined as an academic who leads a re­search group and who teaches at least two units.</p><p>PENG Light distinguishes two types of inter­rogative sentences: yes/no-questions (16) and wh-questions (17):</p></subsection></section><section number="16." title="Does David Miller teach a tutorial on Monday?"><p>17. When does David Miller who convenes COMP249 teach a tutorial?</p><p>Interrogative sentences are derived from simple PENG Light sentences and serve the same pur­pose as queries in a formal query language.</p><subsection number="4.2" title="Anaphora Resolution"><p>In PENG Light, proper nouns, definite noun phrases and variables (that build an unambigu­ous alternative to pronouns) can be used anaphor-ically. The anaphora resolution algorithm of PENG Light resolves an anaphorically used noun phrase with the most recent accessible noun phrase antecedent that matches fully or partially with the anaphor and that agrees in person, num­ber and gender with that anaphor. The anaphora resolution algorithm of PENG Light is embedded into the grammar and triggered whenever a noun phrase has been processed.</p><p>If a definite noun phrase can not be resolved by the anaphora resolution algorithm, it is interpreted as an indefinite noun phrase and introduces a new discourse referent into the universe of discourse.</p></subsection><subsection number="4.3" title="Discourse Representation Structures"><p>The language processor (DRS version) of the PENG Light system translates texts incrementally into TPTP notation (Sutcliffe and Suttner, 1998) with the help of discourse representation struc­tures (DRSs) (Kamp and Reyle, 1993). The DRSs used in PENG Light rely on an event based nota­tion (Davidson, 1967; Parsons, 1994) and a small number of thematic roles similar to (Kipper et al., 2008). Some of the conditions in the result­ing DRS are annotated with syntactic informa­tion in order to improve the processability of the DRS by other system components (for example, the anaphora resolution algorithm). These condi­tions have the form Pred#Anno whereas Pred is a predefined predicate and Anno is a list that contains syntactic information. Figure 2 shows a simple DRS for the sentence (18): 18. David Miller works at Macquarie University.</p><p>The grammar of PENG Light contains not only feature structures for DRSs but also feature struc­tures for syntactic and pragmatic information. In PENG Light, the construction of a DRS always runs in parallel with the construction of a syntax tree and a paraphrase. The paraphrase clarifies how the input has been interpreted by the gram­mar and can be used to show the author all rele­vant substitutions.</p></subsection></section><section number="5" title="Chart Parsing in PENG Light"><p>The grammar of PENG Light is specified in def­inite clause grammar (DCG) notation. How­ever, the direct execution of a DCG would create many partial structures and destroy them while backtracking. This is not particularly efficient for generating look-ahead information (Kuhn and Schwitter, 2008). In order to avoid unneces­sary repetition of work and to generate lookahead information efficiently, the DCG is trans­formed via term expansion (a well-known logic programming technique) into a notation that can be processed by the chart parser of PENG Light.<page local="5" global="84"/> The chart parser is based on work by (Gazdar and Mellish, 1989) but has been substantially ex­tended to better support the incremental process­ing of PENG Light sentences, in particular to al­low for generating look-ahead information, for processing compound words, and for resolving anaphoric references during the parsing process.</p><table caption="Figure 2: Annotated Discourse Representation Structure in PENG Light" 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>[drs([A, B,</p></td><td class="cell"><p>C],</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>[theta(A,</p></td><td class="cell"><p>theme, C)#[1],</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>event(A,</p></td><td class="cell"><p>working)#[1],</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>theta(A,</p></td><td class="cell"><p>location, B)#[1],</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>named(B,</p></td><td class="cell"><p>macquari^university)#[1,</p></td><td class="cell"><p>[third,   sg, neut],</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>['Macquarie','University']],</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>named(C,</p></td><td class="cell"><p>david_miller)#[1, [third,</p></td><td class="cell"><p>sg, masc],['David','Miller']]])]</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><subsection number="5.1" title="Basics of Chart Parsing"><p>In general, a chart parser stores well-formed con­stituents and partial constituents in a chart (= ta­ble) that consists of a series of numbered vertices that are linked by edges (Kay, 1980). The ver­tices mark positions in the input and edges tell us what constituents have been recognised where for a given set of grammar rules. The chart parser of PENG Light represents edges as predicates with six arguments:</p><p>edge(SN,V1,V2,LHS,RHSFound,RHSToFind)</p><p>The first argument SN stores the sentence num­ber, the subsequent two arguments state the exis­tence of an edge between vertex V1 and vertex V2, and the next three arguments represent informa­tion about the grammar rule. LHS is a category on the left-hand side of a grammar rule, RHSFound is a list of confirmed categories that have been found on the right-hand side of the grammar rule, and RHSToFind is a list of categories on the right-hand side that still need to be confirmed.</p><p>Inactive edges represent well-formed con­stituents where the right-hand side RHSToFind is empty, and active edges represent partial con­stituents where the right-hand side is not empty. The fundamental rule of chart parsing states what should happen when an inactive edge and an ac­tive edge meet. It specifies that whenever an in­active edge can extend an active edge, then a new edge (that is either active or inactive) is built and added to the chart. Finally, the prediction rule of chart parsing generates new active edges and is dependent on the first category on the right-hand side of a grammar rule and the previous state of the fundamental rule.</p></subsection><subsection number="5.2" title="Initialising the Chart"><p>We initialise the chart top-down and guarantee that a number of active edges are added to the chart using a failure-driven loop (see (Kuhn and Schwitter, 2008) for details). This initialisation process creates, for example, the following (radi­cally simplified) set of active edges that start and end at vertex Ofor the first sentence:</p><p>edge(1,0,0,d(_),[],[s(_),pm(_)]). edge(1 0,0,s(_),[],[np(_),vp(_)]). edge(1,0,0,np(_),[],[det(_),noun(_)]). edge(1,0,0,np(_),[],[pn(_)]). edge(1,0,0,det(_),[],[lexicon(_)]). edge(1,0,0,pn(_),[],[lexicon(_)]).</p><p>Additionally, the initialisation process adds the initial look-ahead information to the knowledge base. This look-ahead information consists of all those lexical categories (lexicon(_) ) that occur as the first element in the list of unconfirmed cat­egories and is stored in the following way in the knowledge base:</p><p>lookahead(FeatureStructures).</p><p>This makes it easy to extract the look-ahead information since the argument <i>FeatureStructures </i>consists of a list of feature-value pairs that contain the required syntactic and semantic information; additionally, the language processor can use this information to extract all word forms from the linguistic lexicon for a specific category that obey the current grammatical constraints.</p></subsection><subsection number="5.3" title="Processing Simple Words"><p>Once the chart has been initialised and a set of look-ahead categories has been displayed, the au­thor can enter the first word form that belongs to one of these categories. Simple word forms are stored in the following way in the lexicon of</p><p>PENG Light:</p><p>lexicon([ cat:pn, wform:['John'], syn:[third,   sg, masc], sem:[[I,  person], atomic], con:named(I, john)]).</p><p>The chart parser uses the rule below together with Rule 4 in Figure 4 to look up a simple word (for example, <i>John) </i>in the lexicon:</p><page local="6" global="85"/><doubt alpha="57.9" length="38" tooSmall="False" monospace="0.0">(1)add_edge(SN,V1,V2,LHS,Found,RHS) :-</doubt><p>edge(SN,V1,V2,LHS,Found,RHS), !.</p><doubt alpha="51.4" length="37" tooSmall="False" monospace="0.0">(2)add_edge(SN,V1,V2,LHS,Found,[]) :-</doubt><p>assert_edge(SN,V1,V2,LHS,Found,[]), apply_fundamental_rule(SN,V1,V2,LHS,[]).</p><doubt alpha="57.8" length="45" tooSmall="False" monospace="0.0">(3)add_edge(SN,V1,V2,LHS,Found,[RHS|RHSs]) :-</doubt><p>assert_edge(SN,V1,V2,LHS,Found,[RHS|RHSs]), apply_fundamental_rule(SN,V1,V2,LHS,[RHS|RHSs]), predict_active_edges(SN,V2,RHS), update_lookahead_cats(SN,V2,RHS).</p><figure caption="Figure 3: Add Edges"></figure><doubt alpha="62.1" length="29" tooSmall="False" monospace="0.0">start_chart(SN,V1,V2,Word) :-</doubt><p>foreach(word(T,SN,V1,V2,Word,LHS), add_edge(SN,V1,V2,LHS,Word,[])).</p><p>In a first step, the chart parser generates inac­tive edges for each occurrence of the word form in the lexicon using Rule 2 in Figure 3, after check­ing if such an edge does not already exist (Rule 1 in Figure 3). In the second step, the chart parser applies the fundamental rule of chart parsing re­cursively to inactive edges (Rule 2 in Figure 3) and active edges (Rule 3 in Figure 3). In the next step, the prediction rule of chart parsing is applied that looks for each grammar rule that has the cate­gory RHS previously used by the fundamental rule on the left-hand side (lhs), and generates new active edges for these categories. Once this has been done, the look-ahead information is updated (Rule 3 in Figure 3). For our example, this results in the following update of the chart:</p><doubt alpha="28.5" length="123" tooSmall="False" monospace="0.0">edge(1,0,1,s(_),[np(_)],[vp(_)]). edge(1,0,1,np(_),[pn(_)],[]). edge(1,0,1,pn(_),['John'],[]). edge(1,1,1,vp(_),[],[iv(_)])</doubt><doubt alpha="39.4" length="33" tooSmall="False" monospace="0.0">edge(1,1,1,iv(_),[],[lexicon(_)])</doubt><p>Note that for each subsequent simple word form that the author enters, new grammar rules are triggered, new edges are added to the chart, and a new set of look-ahead categories is gener­ated, extracted and then - in our case - sent to</p><p>FoxPENG.</p></subsection><subsection number="5.4" title="Processing Compound Words"><p>As we have seen in the last section, the chart parser of PENG Light handles the input in an incremental fashion on a word by word basis. This creates problems for compound words. Each compound word is stored in the linguistic lexicon as a single entry of the following form:</p><p>lexicon([ cat:noun, wform:[laptop,computer,bag], syn:[third,sg,neut], sem:[[I,entity],atomic], con:object(I,laptop_computer_bag)]).</p><p>This requires a special treatment of compound words by the chart parser since there are no gram­mar rules that describe the structure of these com­pound words, and a compound word can com­pete with other compound words or a simple word during processing. The chart parser of PENG Light uses three different rules (Rules 1-3 in Fig­ure 4) to process compound words. The basic idea behind these rules is to retrieve each com­pound word only once from the linguistic lexi­con as soon as the first element of a compound word becomes available and then maintain a store (compound_word/6) that is used to process all subsequent elements of the compound word (sim­ilar to edges). This will finally result in a single edge for the compound word in the chart.</p><p>Let us assume that the author is in the process of writing the compound noun <i>laptop computer bag. </i>After the first word <i>(laptop) </i>becomes avail­able, the chart parser looks this word up in the linguistic lexicon using Rule 3 (and 4) in Fig­ure 4, finds that this word is the first element of a compound word, and then checks if an ac­tive edge exists that corresponds to the category (lhs) on left-hand side of the grammar rule that has been used for the lexicon lookup.<page local="7" global="86"/> In the next step, the chart parser updates the compound noun using the predicate update_compound_word/6. This predicate stores the sentence number (SN), the starting position (V1) and end position (V2) of the first element of the compound word, the cate­gory (lhs) on the left-hand side of the grammar rule, the found word ([Word]), and the remain­ing elements ([lah|lahs]) of the compound word. These remaining elements serve as new look-ahead information. If the author enters the next word <i>(computer), </i>the chart parser looks up this word in the store of compound words using Rule 2 in Figure 4, removes this word, checks if an active edge exists for this word, and then up­dates the store for compound words and the look-ahead categories. Finally, if the author enters the last element <i>(bag) </i>of the compound word, then the chart parser uses Rule 1 in Figure 4 and checks if the word is the last element of a compound noun, and adds a new edge to the chart that spans the entire compound word using Rule 2 in Figure 3, followed by acall to the fundamental rule. Note that this is a generic solution that can be used to process all categories of compound words.</p></subsection></section><section number="6" title="Unknown Content Words"><p>In principle, most function words can be dis­played directly in the interface since there number is relatively small in controlled natural languages, but content words need to be structured in menus. These menus can be updated dynamically while a text is written. If the number of content words is large, then a copy of the linguistic lexicon can be loaded and maintained on the client side, and the task of the language processor is then reduced to inform the client about which categories of con­tent words can follow the current input. In our case, PENG Light communicates with the client via a JSON object that has the following (simpli­fied) form:</p><doubt alpha="60.0" length="15" tooSmall="False" monospace="0.0">{"lookahead": [</doubt><doubt alpha="52.9" length="17" tooSmall="False" monospace="0.0">["adj",["colour",</doubt><doubt alpha="60.3" length="126" tooSmall="False" monospace="0.0">"shape"]], ["noun",["masculine", "feminine", "masculine-feminine", "neuter-time", "neuter-entity"]] ], "paraphrase":   ["A"] }</doubt><p>This object tells the client that either an adjec­tive or a noun can follow the current input (in our case an indefinite determiner) and specifies syntactic and semantic constraints for these cat­egories.<page local="8" global="87"/> This information becomes also useful -as we will see below - if a content word is not available in the linguistic lexicon.</p><table caption="Figure 4: Processing Simple and Compound Words" 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>(1)</p></td><td class="cell"><p>word(compound,SN,V1,V2,[Word],LHS) :-</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>compound_word(SN,V0,V1,LHS,Found,[Word]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>add_edge(SN,V0,V2,LHS,[Word|Found],[]).</p></td><td class="cell"><p></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>word(compound,SN,V1,[Word],LHS) :-</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>compound_word(SN,V0,V1,LHS,Found,[Word,LAH|LAHs]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>edge(SN,V0,V0,LHS,[],[RHS|RHSs]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>update_compound_word(SN,V0,V2,LHS,[Word|Found],[LAH|LAHs]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>update_lookahead_cats(SN,V2,[LAH|LAHs]).</p></td><td class="cell"><p></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>word(compound,SN,V1,[Word],LHS) :-</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>call( LHS ==&gt;   [ lexicon([cat:Cat,wform:[Word,LAH|LAHs]|Rest],_)</p></td><td class="cell"><p>] ),</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>edge(SN,V1,V1,LHS,[],[RHS|RHSs]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>call( lexicon([cat:Cat,wform:[Word,LAH|LAHs]|Rest],_) ),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>update_compound_word(SN,V1,V2,LHS,[Word],[LAH|LAHs]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>update_lookahead_cats(SN,V2,[LAH|LAHs]).</p></td><td class="cell"><p></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>word(simple,SN,V1,V2,[Word],LHS) :-</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>\+ compound_word(SN,V0,V1,_,Found,[Word]),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>call( LHS ==&gt;   [  lexicon([cat:Cat,wform:[Word]|Rest],_)   ] ),</p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>call( lexicon([cat:Cat,wform:[Word]|Rest],_) ).</p></td><td class="cell"><p></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>In real world applications, there are always cases where a required content word is missing from the linguistic lexicon. PENG Light allows the author to define a content word during the writing process. If the author enters a content word into the input field of the editor that is not yet defined in the lexicon, then the spelling cor­rector of PENG Light is used and provides alter­native spellings that correspond to available lexi­cal entries. PENG Light uses the Daumerau rules for this purpose that cover about 80% of human spelling errors (Damerau, 1964). These rules deal with the insertion, deletion, and substitution of single characters, and the transposition of two characters.</p><p>If a content word is not misspelled and not in the lexicon, then the author has to add the word form to the linguistic lexicon. The grammar al­ready constrains the set of syntactic and semantic features that the author has to specify for a new content word. Let us assume that the word <i>laptop </i>is not yet in the lexicon. In this case the author has to specify only that this word is <i>neuter </i>and belongs to the sortal category <i>entity </i>but not that it is singular since this information can be derived from the current position of the word in the sen­tence and the information in the grammar. PENG Light accepts in-line specifications of linearised feature structures in a "microformat" notation, for example:</p><doubt alpha="62.5" length="24" tooSmall="False" monospace="0.0">Input:  A +n-n-e:laptop+</doubt><p>Note that this feature structure is an abbrevi­ated notation that contains syntactic and seman­tic information derived from the feature structure provided by the JSON object. The plus symbol (<i>+</i>) functions as a control character that switches from the text entry mode to the vocabulary entry mode. The subsequent character sequence <i>(n-n-e) </i>represents the required feature structure, followed by a colon (:), the actual word form <i>(laptop), </i>and a plus symbol (<i>+</i>) that quits the vocabulary entry mode. The plus sign at the end of the word is nec­essary in order to deal with compound words, for example:</p><p>Input:  A +n-n-e:laptop computer bag+</p><p>Using this approach, the author needs to spec­ify only a minimal set of features and does not need to leave the text area in order to add a new content word to the user lexicon. For each cate­gory of content words, PENG Light maintains a list of unapproved words. A new content word is always checked against this list, before it is added to the user lexicon. Once a new word form has been successfully added to the linguistic lexicon, it is immediately parsed by the language proces­sor and new look-ahead information is generated. Note that the author can only add new content words (adjectives, nouns, verbs and adverbs) us­ing this microformat but not function words.</p><p>Similar to adding new content words, existing content words can be removed from the user lex­icon. Alternatively, the microformat for feature structures is available from a menu of options.</p></section><section number="7" title="Conclusions"><p>In this paper, we presented an update on the controlled natural processor of PENG Light and showed how the language processor communi­cates with FoxPENG, an AJAX-based Firefox ex­tension, using JSON as data-interchange format. For each approved word form that the author en­ters into the text area of this tool, the chart parser of PENG Light generates a set of look-ahead cat­egories that determine what categories of word forms can follow the current input. This way only syntactically correct input is accepted by the lan­guage processor that can be translated unambigu­ously into a formal target notation. We focused in particular on an extension of the chart parser of PENG Light and showed in detail how com­pound words for which no grammar rules exist can be parsed incrementally during the writing process. We solved the unknown word problem with the help of a microformat for linearised fea­ture structures that allows an author to specify un­known content words during the parsing process using minimal linguistic information. The con­trolled natural language PENG Light can be used as a high-level specification language for different kinds of knowledge systems and can help to solve the knowledge acquisition problem. Depending on the expressivity of the controlled language, the input can currently be translated into first-order logic or into a variant of description logic.</p><page local="9" global="88"/></section><references><p>ASD 2007. ASD Simplified Technical English. <i>Spec­ification ASD-STE100, </i>International specification for the preparation of maintenance documentation in a controlled language, Issue 4, January. K. Barker, B. Agashe, S.-Y. Chaw, J. Fan, N. Fried­land, M. Glass, J. Hobbs, E. Hovy, D. Israel, D.S.</p><p>Kim, R. Mulkar-Mehta, S. Patwardhan, B. Porter, D. Tecuci, and P. Yeh. 2007. Learning by Read­ing: A Prototype System, Performance Baseline and Lessons Learned. In: <i>Proceedings of the 22nd AAAI Conference on Artificial Intelligence, </i>pp. 280-286.</p><p>P. Baumgartner, U. Furbach, and B. Pelzer. 2007. Hyper Tableaux with Equality. In: <i>Proceedings of CADE-21, </i>LNAI4603, pp. 492-507. P. Clark, P. Harrison, T. Jenkins, T. Thompson, and R. Wojcik. 2005. Acquiring and Using World Knowl­edge Using a Restricted Subset of English. In: <i>Pro­ceedings ofFLAIRS'05, </i>pp. 506-511. P. Clark, P. Harrison, J. Thompson, R. Wojcik, T. Jenk­ins, and D. Israel. 2007. Reading to Learn: An In­vestigation into Language Understanding. In: <i>Pro­ceedings ofAAAAI 2007 Spring Symposium on Ma­chine Reading, </i>pp. 29-35.</p><p>F. J. Damerau. 1964. A technique for computer detec­tion and correction of spelling errors. In: <i>Commu­nications of the ACM, </i>7(3), pp. 171-176.</p><p>D. Davidson. 1967. The logical form of action sen­tences. In: Rescher, N. (ed.): <i>The Logic ofDeci-sion and Action. </i>University of Pittsburgh Press, pp. 81-95.</p><p>N.E. Fuchs, U. Schwertel, and R. Schwitter. 1998.</p><p>Attempto Controlled English - Not Just Another Logic Specification Language. In: <i>Proceedings of LOPSTR'98, </i>pp. 1-20.</p><doubt alpha="56.2" length="48" tooSmall="False" monospace="0.0">N.E. Fuchs, K. Kaljurand, and T. Kuhn. 2008. At-</doubt><p>tempto Controlled English for Knowledge Repre­sentation. In: <i>Reasoning Web, Fourth International Summer School 2008, </i>LNCS 5224, pp. 104-124.</p><p>G. Gazdar, C. Mellish. 1989. <i>Natural Language Pro­cessing in Prolog. </i>An Introduction to Computa­tional Linguistics, Addison-Wesley.</p><p>H. Kamp, U. Reyle. 1993. From Discourse to Logic. Introduction to Modeltheoretic Semantics of Natu­ral Language, Formal Logic and Discourse Repre­sentation Theory, Kluwer.</p><p>M. Kay. 1980. Algorithm Schemata and Data Struc­tures in Syntactic Processing. In: <i>CSL-80-12, </i>Xe­rox Parc, Palo Alto, California. K. Kipper, A. Korhonen, N. Ryant, and M. Palmer. 2008. A large-scale classification of english verbs. In: Language Resources and Evaluation 42(1), pp. 21-40.</p><p>T. Kuhn. 2008. AceWiki: A Natural and Expres­sive Semantic Wiki. In: <i>Proceedings ofSemantic Web User Interaction at CHI 2008: Exploring HCI Challenges.</i></p><p>T. Kuhn, R. Schwitter. 2008. Writing Support for Controlled Natural Languages. In: <i>Proceedings of</i> <i>ALTA 2008, </i>Tasmania, Australia, pp. 46-54.</p><p>T. Parsons. 1994. Events in the Semantics of English. A Study in Subatomic Semantics. MIT Press.</p><p>F. C.N. Pereira, S.M. Shieber. 1987. <i>Prolog and Natural-Language Analysis. </i>CSLI, Lecture Notes, Number 10.</p><p>R. Schwitter. 2002. English as a Formal Specifica­tion Language. In: <i>Proceedings of DEXA 2002, </i>September 2-6, Aix-en-Provence, France, pp. 228­232.</p><p>R. Schwitter, A. Ljungberg, and D. Hood. 2003. ECOLE - A Look-ahead Editor for a Controlled Language, In: <i>Proceedings of EAMT-CLAW03, </i>May 15-17, Dublin City University, Ireland, pp.</p><p>141-150.</p><p>R. Schwitter. 2008. Working for Two: a Bidirectional Grammar for a Controlled Natural Language. In: <i>LNAI 5360, </i>pp. 168-179. J.F. Sowa. 2004. Common Logic Controlled En­glish. <i>Technical Report, </i>24 February 2004. http: //www.jfsowa.com/clce/specs.htm</p><p>G. Sutcliffe, C.B. Suttner. 1998. The TPTP Problem Library: CNF Release v1.2.1. In: Journal of Auto­mated Reasoning, 21(2), pp. 177-203.</p><p>H. R. Tennant, K.M. Ross, R.M. Saenz, C.W. Thomp­son, and J.R. Miller. 1983. Menu-Based Natural Language Understanding. In: <i>Proceedings ofthe 21st Meeting ofthe Association for Computational Linguistics </i>(ACL), MIT Press, pp. 51-58.</p><p>C. Thompson, P. Pazandak, and H. Tennant. 2005. Talk to Your Semantic Web. In: <i>IEEE Internet Computing, </i>9(6), pp. 75-78.</p></references></body></article>