File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/intro/89/e89-1033_intro.xml
Size: 15,306 bytes
Last Modified: 2025-10-06 14:04:42
<?xml version="1.0" standalone="yes"?> <Paper uid="E89-1033"> <Title>Interactive Incremental Chart Parsing</Title> <Section position="3" start_page="0" end_page="0" type="intro"> <SectionTitle> 2 Incremental Chart Parsing </SectionTitle> <Paragraph position="0"/> <Section position="1" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.1 Chart Parsing </SectionTitle> <Paragraph position="0"> The incremental parser has been grounded in a chart-parsing framework (Kay 1980, Thompson 1981, Thompson and Ritchie 1984) for the following reasons: * chart parsing is an efficient, open-ended, well understood, and frequently adopted technique in natural-language processing; * chart parsing gives us a previously unexplored possibility of embedding incrementality at a low cost.</Paragraph> </Section> <Section position="2" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.2 Edge Dependencies </SectionTitle> <Paragraph position="0"> The idea of incremental chart parsing, as put forward here, is based on the following observation: The chart, while constituting a record of partial analyses (chart edges), may easily be provided with information also about the dependencies between those analyses. This is just what we need in incremental parsing since we want to propagate the effects of a change precisely to those parts of the previous analysis that, directly or indirectly, depend on the updated information.</Paragraph> <Paragraph position="1"> In what ways could chart edges be said to depend on each other? Put simply, an edge depends upon another edge if it is formed using the latter edge.</Paragraph> <Paragraph position="2"> Thus, an edge formed through a prediction step depends on the (one) edge that triggered it. 4 Likewise, an edge formed through a combination 5 depends on the active-inactive edge pair that generated it. A scanned edge, on the other hand, does not depend upon any other edge, as scanning can be seen as a kind of initialization of the chart, e In order to account for edge dependencies we associate with each edge the set of its immediate source 4In the case of an initial top-down prediction, the source would be non-existent.</Paragraph> <Paragraph position="3"> SThe ~raldeter operation in Earley (1970); the ~ndarnentad rule in Thompson (1981:2).</Paragraph> <Paragraph position="4"> sit might be argued that a dependency should be established also in the case of an edge being proposed but rejected (owing to a redundancy test) because it already exists. However, as long as updates affect all preterminal edges extending from a vertex, this appears not to be crucial.</Paragraph> <Paragraph position="5"> - 242 edges (~back pointers&quot;). This information could be used to derive the corresponding sets of dependent edges (gforward pointers &quot;) that we are interested in. For example, when a word in the previous input has been deleted, we want to remove all edges which depend on the preterminal (lexical) edge(s) corresponding to this word, as well as those preterminal edges themselves.</Paragraph> <Paragraph position="6"> Formally, let P be a binary dependency relation such that e P e ~ if and only if e t is a dependant of e, i.e., e' has been formed (directly) using e. If D* is the reflexive transitive closure of P, all edges e&quot; should be removed for which e D* e&quot; holds, i.e., all edges which directly or indirectly depend on e, as well as e itself. In addition, we are going to make use of the transitive closure of D, D +.</Paragraph> <Paragraph position="7"> The resulting style of incremental parsing resembles truth (or reason) maintenance, in particular ATMS (de Kleer 1986). A chart edge here corresponds to an ATMS node, a preterminal edge corresponds to an assurnption node, the immediate source information of an edge corresponds to a justification, the dependency relation D* provides information corresponding to ATMS labels, etc.</Paragraph> </Section> <Section position="3" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.3 Technical Preliminaries </SectionTitle> <Paragraph position="0"> The chart is a directed graph. The nodes, or vertices, vl, ..., Vn+l correspond to the positions surrounding the words of an n-word sentence t01 .. * ton.</Paragraph> <Paragraph position="1"> A pair of vertices vl,vy may be connected by arcs, or edges, bearing information about (partially) analysed constituents between v~ and vy. We will take an edge to be a tuple (s, t, X0 --* a.#, D, E) starting from vertex v~ and ending at vertex vt with dotted rule X0--* a.~/ a dag D (cf. section 2.3.3), and the set of immediately dependent edges, E. s In order to lay the ground for easy splitting and joining of chart fragments, we will take a vertex to consist of three parts, (L, Aioop, R), left, middle, and right. L and R will have internal structure, so that the full vertex structure will come out like The left part, (Ain, Ii~), consists of the incoming active and inactive edges which will remain with the left portion of the chart when it is split due VA dotted rule Xo --* a.~ corresponds to an (active) X0 edge containing an analysis of constituent(s) a, requiring constituent(s) ~ in order to yield an inactive edge.</Paragraph> <Paragraph position="2"> Sin other words, the set E of an edge e consists of all edges el for which e P el holds.</Paragraph> <Paragraph position="3"> to some internal sentence-editing operation. Correspondingly, the right part, (Aost, Io,t), consists of the outgoing active and inactive edges which will remain with the right portion of the chart. The middle part, Aioop, consists of the active looping edges which, depending on the rule-invocation strategy, should remain either with the left or the right portion of the chart (cf. section 3.1).</Paragraph> <Paragraph position="4"> We will make use of dots for qualifying within elements of tuples. For example, e.s will stand for the starting vertex of edge e. Likewise, vi.L will stand for the set of edges belonging to the left half of vertex number i, and vi.Ai~ will denote the set of its active incoming edges. In addition, we will use vi.Po~t as a shorthand for the set of inactive outgoing edges at vi which are also preterminal (lexical).</Paragraph> <Paragraph position="5"> In general, parsing could be seen as a mapping from a sentence to a structure representing the analysis of the sentence -- in this case a chart. Incremental parsing requires a more complex mapping F(., ~, r, Co) ~ cl from an edit operation ~7, a pair of cursor positions ~;, a sequence of words r (empty in the case of deletion), and an initial chart Co to a new chart cl (and using a grammar and dictionary as usual).</Paragraph> <Paragraph position="6"> We are going to assume three kinds of editing operation, insert, delete, and replace. Furthermore, we assume that every operation applies to a continuous sequence of words tot.., tot, each of which maps to one or several preterminal edges extending from vertices vt, * .., vr, respectively. deg Thus, ~ may here take the values insert, delete, or replace; ~ is a pair of positions l, r such that the sequence of positions l, ..., r map directly to vertices vi, ..., W, and r is the corresponding sequence of words wt... tot.</Paragraph> <Paragraph position="7"> In addition, we will make use of the constant 6 = r - l + 1, denoting the number of words affected by the editing operation.</Paragraph> <Paragraph position="8"> In the algorithm below, as well as in the actual implementation, we have adopted a unification-based grammatical formalism with a context-free base, PATR (Shieber et al. 1983, Shieber 1986), because this seems to be the best candidate for a lingua /ranca in current natural-language processing. However, this formalism here shows up only within the edges, where we have an extra dag element (D), and when referring to rules, each of which consists of a degCharacter editing is processed by the scanner; cf. section 3.3.</Paragraph> <Paragraph position="9"> - 243 pair IX0 ~ ~, D) of a production and a dag. In the dag representation of the rule, we will store the context-free base under cat features as usual. We assume that the grammar is cycle-free.</Paragraph> </Section> <Section position="4" start_page="0" end_page="0" type="sub_section"> <SectionTitle> 2.4 An Algorithm for Incremental Chart Parsing </SectionTitle> <Paragraph position="0"> This section states an algorithm for incremental chart parsing, divided into update routines, subroutines, and an underlying chart parser. It handles update of the chart according to one edit operation; hence, it should be repeated for each such operation. The underlying chart parser specified in the end of section 2.4.2 makes use of a bottom-up rule-invocation strategy. Top-clown rule invocation will be discussed in section 3.1.</Paragraph> <Paragraph position="1"> Input: An edit operation ~7, a pair of vertex numbers l, r, a sequence of words tot ..- t0r, and a chart co. We assume that chart co consists of vertices ul, ..., v~a,t, where last ~_ 1. We furthermore assume the constant 6 = r - l + 1 to be available.</Paragraph> <Paragraph position="2"> Output: A chart cl.</Paragraph> <Paragraph position="3"> Method: On the basis of the input, select and execute the appropriate update routine below.</Paragraph> </Section> <Section position="5" start_page="0" end_page="0" type="sub_section"> <SectionTitle> Update Routines </SectionTitle> <Paragraph position="0"> Insertl: Insertion at right end of Co for i :-- l, ..., r do Scan(w~);</Paragraph> <Paragraph position="2"> This case occurs when 6 words wt&quot;&quot; tv~ have been inserted at the right end of previous input (i.e., l = last). This is the special case corresponding to ordinary left-to-right chart parsing, causing the original chart co to be extended 6 steps to the right.</Paragraph> <Paragraph position="3"> Deletel: Deletion at right end of co</Paragraph> <Paragraph position="5"> This case occurs when 5 words w~... t0r have been deleted up to and including the right end of previous input (i.e., r = last - 1). It is handled by removing the preterminal edges corresponding to the deleted words along with all their dependent edges.</Paragraph> <Paragraph position="6"> Delete2: Deletion before right end of co for i :- l, ..., r do</Paragraph> <Paragraph position="8"> This case occurs when 6 words wt&quot;. wr have been deleted in an interval within or at the left end of previous input (i.e., r < last - 1). It is handled by removing the preterminal edges corresponding to the deleted words along with all their dependent edges, and then collapsing the chart, moving all edges from vertex vr+l and on 6 steps to the left.</Paragraph> <Paragraph position="9"> Insert2: Insertion before right end of co</Paragraph> <Paragraph position="11"> This case occurs when 6 words wt-'. wr have been inserted at a position within or at the left end of previous input (i.e., I < last). It is handled by first removing all edges that %ross ~ vertex v~ (the vertex at which the new insertion is about to start). Secondly, the chart is split at vertex vl by moving all edges extending from this vertex or some vertex to the right of it 5 steps to the right. Finally, the new input is scanned and the resulting edges inserted into the chart.</Paragraph> <Paragraph position="12"> Replace: Replacement within co for i :-- I, ..., r do Ve: c e v~.Po~t RemoveEdgeslnD* (e); for i :---- 1, ..., r do Scan(wi); RunChart.</Paragraph> <Paragraph position="13"> This case occurs when 8 words wt-.. Wr have been replaced by 6 other words at the corresponding positions within previous input (i.e., 1 ~_ I and r ~_ last; typically I -- r). It is handled by first removing the preterminal edges corresponding to the replaced words along with all their dependent edges, and then scan the new words and insert the resulting edges into the chart.</Paragraph> <Paragraph position="14"> Alternatively, we could of course realize replace through delete and insert, but having a dedicated replace operation is more efficient.</Paragraph> <Paragraph position="16"> This routine moves the contents of a vertex from v#om to vto and assigns new connectivity information to the affected (outgoing) edges.</Paragraph> <Paragraph position="18"> This routine moves the contents of the right half (including active looping edges) of a vertex from vy,o,n to vto and assigns new connectivity information to the affected (outgoing) edges.</Paragraph> <Paragraph position="19"> The purpose of this routine, which is called from Insert2, is to remove all edges that %ross&quot; vertex vt where the new insertion is about to start. This can be done in different ways. The solution above makes use of dependency information, removing every edge which is a dependant of both some preterminal edge incident to the change vertex and some preterminal edge extending from it. tl Alternatively, one could simply remove every edge e whose left connection e.s < l and whose right connection e.t > l.</Paragraph> <Paragraph position="20"> ldegIt may sometimes be the case that not all edges in the dependency closure need to be removed because, in the course of updating, some edge receives the same value as previously. This happens for example if a word is replaced by itself, or, given a grammar with atomic categories, if (say) a noun is replaced by another noun. One could reformulate the routines in such a way that they check for thiJ before removing an edge. 11For simplicity, we presuppo~ that preterminal edges only extend between adjacent vertices.</Paragraph> </Section> <Section position="6" start_page="0" end_page="0" type="sub_section"> <SectionTitle> Chart Parser </SectionTitle> <Paragraph position="0"> Scan(~): If wl = a, then, for all lexical entries of the form (Xo--,a,D), add the edge (i,i+ 1, X0--, a., D, C/).</Paragraph> <Paragraph position="1"> Informally, this means adding an inactive, preterminal edge for each word sense of the word.</Paragraph> <Paragraph position="2"> RunChart: For each vertex v~, do the following two steps until no more edges can be added to the chart. 1. Predict/BottomUp: For each edge e starting at vi of the form (i, j, X0 --~ a., D, E) and each rule of the form (Y0 ~ Yx/~, D') such that D'((Y1 cat)) = D((Xo cat)), add an edge of the form (i, i, Yo --* .\]/1/3, D', {e)) if this edge is not subsumed 1~ by another edge.</Paragraph> <Paragraph position="3"> Informally, this means predicting an edge according to each rule whose first right-hand-side category matches the category of the inactive edge under consideration. 2. Combine: For each edge e of the form (i, 3&quot;, Xo --* a.X,n~, D, E) and each edge e s of the form (3&quot;, k, Yo --* ~/., D', El), add the edge (i, k, Xo ---, aX, n.~, D U \[Xm: D'(Yo)\], {e, e'}) if the unification succeeds and this edge is not subsumed by another edge.</Paragraph> <Paragraph position="4"> Informally, this means forming a new edge whenever the category of the first needed constituent of an active edge matches the category of an inactive edge, 13 and the dag of the inactive edge can be unified in with the dag of the needed constituent.</Paragraph> </Section> </Section> class="xml-element"></Paper>