| { |
| "paper_id": "P85-1016", |
| "header": { |
| "generated_with": "S2ORC 1.0.0", |
| "date_generated": "2023-01-19T09:39:17.741779Z" |
| }, |
| "title": "Structure Sharing with Binary Trees", |
| "authors": [ |
| { |
| "first": "Lauri", |
| "middle": [], |
| "last": "Karttunen", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "CSU Stanford", |
| "location": {} |
| }, |
| "email": "" |
| }, |
| { |
| "first": "Sri", |
| "middle": [], |
| "last": "International", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "CSU Stanford", |
| "location": {} |
| }, |
| "email": "" |
| }, |
| { |
| "first": "Stanford", |
| "middle": [ |
| "Martin" |
| ], |
| "last": "Csli", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "CSU Stanford", |
| "location": {} |
| }, |
| "email": "" |
| }, |
| { |
| "first": "", |
| "middle": [], |
| "last": "Kay", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "CSU Stanford", |
| "location": {} |
| }, |
| "email": "" |
| } |
| ], |
| "year": "", |
| "venue": null, |
| "identifiers": {}, |
| "abstract": "Many current interfaces for natural language represent syntactic and semantic information in the form of directed graphs where attributes correspond to vectors and values to nodes. There is a simple correspondence between such graphs and the matrix notation linguists traditionally use for feature sets.. ' n\"<'a'\"\" sg 3rd Systems Development Foundation, was also supported by the Defense Advanced Research Projects Agency under Contracts N00039-80-C-0575 and N00039-84-C-0524 with the Naval Electronic Systems Command. The views and conclusions contained in this document are those of the author and should not be interpreted as representative of the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency, or the United States government. Thanks are due to Fernando Pereira and Stuart Shieber for their comments on earlier presentations of this material.", |
| "pdf_parse": { |
| "paper_id": "P85-1016", |
| "_pdf_hash": "", |
| "abstract": [ |
| { |
| "text": "Many current interfaces for natural language represent syntactic and semantic information in the form of directed graphs where attributes correspond to vectors and values to nodes. There is a simple correspondence between such graphs and the matrix notation linguists traditionally use for feature sets.. ' n\"<'a'\"\" sg 3rd Systems Development Foundation, was also supported by the Defense Advanced Research Projects Agency under Contracts N00039-80-C-0575 and N00039-84-C-0524 with the Naval Electronic Systems Command. The views and conclusions contained in this document are those of the author and should not be interpreted as representative of the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency, or the United States government. Thanks are due to Fernando Pereira and Stuart Shieber for their comments on earlier presentations of this material.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Abstract", |
| "sec_num": null |
| } |
| ], |
| "body_text": [ |
| { |
| "text": "pursue some yet unexplored option. Our experience suggests that the amount of computational effort that goes into producing these copies is much greater than the cost of unification itself. It accounts for a significant amount of the total parsing time.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "In a sense, most of the copying effort is wasted.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "Unifications that fail typically fail for a simple reason.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "If it were known in advance what aspects of structures are relevant in a particular case, some effort could be saved by first considering only the crucial features of the input.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "This paper lays out one strategy that has turned out to be very useful in eliminating much of the wasted effort. The index of the top node is 1; the two cells below have indices 2 and 3. In general, a node whose index is n may be the parent of ceils indexed 2n and 2n + 1. Figure 6 ).", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 273, |
| "end": 281, |
| "text": "Figure 6", |
| "ref_id": "FIGREF1" |
| } |
| ], |
| "eq_spans": [], |
| "section": "Solution: structure sharing", |
| "sec_num": null |
| }, |
| { |
| "text": "The most important advantage that the scheme minimizes the amount of copying that has to be done.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lazy copying", |
| "sec_num": null |
| }, |
| { |
| "text": "In general, when a graph is copied, we duplicate only", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lazy copying", |
| "sec_num": null |
| }, |
| { |
| "text": "The operation that replaces copying in this scheme If the node that we want to copy is not the topmost node of a tree, we need to duplicate the nodes along the branch leading to it.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lazy copying", |
| "sec_num": null |
| }, |
| { |
| "text": "When a tree headed by the copied node has to be changed, we use the generation tags to minimize the From the point of view of a process that only needs to find or print out the value of particular features, it makes no difference that the nodes containing the values belong to several ,trees as long as there is no confusion about the structure.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lazy copying", |
| "sec_num": null |
| }, |
| { |
| "text": "Accessing an arbitrary cell in a binary tree consumes time in proportion to the logarithm of the size of the ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Relative addressing", |
| "sec_num": null |
| }, |
| { |
| "text": "With respect to node 2, node 11 is in the same position as 7 is with respect 1. Thus the retative address of cell 11 counted from 9 is 2,7--'two nodes up, then down as if going to node 7\". In general, relative addresses are of the form <up,down > where <up> is the number of links to the lowest common ancestor of the origin and <down> is the relative index of the target node with respect to it.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 6", |
| "sec_num": null |
| }, |
| { |
| "text": "Sometimes we can just go up or down on the same branch; for example, the relative address of cell 10 seen from node 2 is simply 0,6; the path from 8 or 9 to 4is 1,1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 6", |
| "sec_num": null |
| }, |
| { |
| "text": "As one might expect, it is easy to see these relationships if we think of node indices in their binary representation (see ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 6", |
| "sec_num": null |
| }, |
| { |
| "text": "Keeping trees balanced When two feature matrices are unified, the binary trees corresponding to them have to be combined to form a single tree. New attributes are added to some of the nodes; other nodes become \"pointer nodes,\" 136 i.e., their only content is the relative address of some other node where the real content is stored. As long as we keep adding nodes to one tree, it is a simple matter to keep the tree maximally balanced. At any given time, only the growing fringe of the tree can be incompletely filled. When two trees need to be combined, it would, of course, be possible to add all the cells from one tree in a balanced fashion to the other one but that would defeat the very purpose of using binary trees because it would mean having to copy almost all of the structure. The only alternative is to embed one of the trees in the other one. The resulting tree will not be a balanced one; some of the branches are much longer than others. Consequently, the average time needed to look up a value ~s bound to be worse than in a balanced tree.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "For example, suppose that we want to unify a copy of the feature set in Figure lb Although the feature set in Figure 9 .a is the same as the one represented by the right half of Figure 7 , the structure in Figure 9 .b is more complicated because it is derived by unifying copies of two separate trees, not by simply adding more features to a tree, as in In the case at hand, it matters very little which of the two trees becomes the host for the other. The resulting tree is about as much out of balance either way. However, when a sequence of unifications is ~erformed, differences can be very significant. For example, if A, B, and C are unified with one another, ~t can make a great deal of difference, which of the two alternative shapes in Figure 10 is produced as the final result.", |
| "cite_spans": [], |
| "ref_spans": [ |
| { |
| "start": 72, |
| "end": 81, |
| "text": "Figure lb", |
| "ref_id": "FIGREF1" |
| }, |
| { |
| "start": 110, |
| "end": 118, |
| "text": "Figure 9", |
| "ref_id": "FIGREF1" |
| }, |
| { |
| "start": 178, |
| "end": 186, |
| "text": "Figure 7", |
| "ref_id": "FIGREF1" |
| }, |
| { |
| "start": 206, |
| "end": 214, |
| "text": "Figure 9", |
| "ref_id": "FIGREF1" |
| }, |
| { |
| "start": 745, |
| "end": 754, |
| "text": "Figure 10", |
| "ref_id": "FIGREF1" |
| } |
| ], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "EQUATION", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [ |
| { |
| "start": 0, |
| "end": 8, |
| "text": "EQUATION", |
| "ref_id": "EQREF", |
| "raw_str": "A A . . , \u00a2 ~ ~ ,&", |
| "eq_num": "Figure 10" |
| } |
| ], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "When a choice has to be made as to which of the two", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 ,rees to embed in the other, it is important to minimize the length of the longest path in the resulting tree. To do this at all efficiently requires addtitional infornation to be stored with each node.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "According to one simple scheme, this is simply the length of the shortest path from the node down to a node with a free left or right pointer. Using this, it is a simple matter to find the shallowest place in a tree at which to embed another one. If the length of the longer path is also stored, it is also easy to determine which choice of host will give rise to the shallowest combined tree.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "Another problem which needs careful attention concerns generation markers. If a pair of trees to be unified have independent histories, their generation markers will presumably be incommensurable and those of an embedded tree will therfore not be valide in the host. Various solutions are possible for this problem.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "The most straightforward is relate the histories of all trees at least to the extent of drawing generation markers from a global pool. In Lisp, for example, the simplest thing is to let them be CONS", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Figure 7", |
| "sec_num": null |
| }, |
| { |
| "text": "We will conclude by comparing our method of structure sharing with two others that we know of: R.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "cells. Conclusion", |
| "sec_num": null |
| }, |
| { |
| "text": "Cohen's immutable arrays and the idea discussed in ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "cells. Conclusion", |
| "sec_num": null |
| } |
| ], |
| "back_matter": [ |
| { |
| "text": "This research, made possible in part by a gift from the", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Acknowledgements", |
| "sec_num": null |
| } |
| ], |
| "bib_entries": {}, |
| "ref_entries": { |
| "FIGREF1": { |
| "text": "The standard operation for working with such graphs is unification. The unification operation succedes only on a pair of compatible graphs, and its result is a parser applies a syntactic rule, it unifies selected features of input constituents to check constraints and to budd a representat=on for the output constituent. Problem: proliferation of copies When words are combined to form phrases, unification is not applied to lexlcat representations directly because it would result in the lexicon being changed. When a word is encountered in a text, a copy is made of its entry, and unification is applied to the copied graph, not the original one. In fact, unification in a typical parser is always preceded by a copying operation. Because of nondeterminism in parsing, it is, in general, necessary to preserve every representation that gets built. The same graph may be needed again when the parser comes back to", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF2": { |
| "text": "can be distributed over the cells of a binary tree in the following way.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF3": { |
| "text": "Figure 2", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF4": { |
| "text": "starts by duplicating the topmost node of the tree that contains it. The rest of the structure remains the same. It is Other nodes are modified only ~f and when destructive changes are about to happen. For example, assume that we need another copy of the graph stored in the tree inFigure 2. This can be obtained by producing a tree which has a different root node, but shares the rest of the structure with its original. In order to keep track of which tree actually owns a given node, each node tames a numeral tag that indicates its parentage. The relationship between the original tree (generation 0) and its copy (generation 1) is illustrated inFigure 3where the generation is separated from the index of a node by", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF5": { |
| "text": "creation of new structure. In general, all and only the nodes on the branch that lead to the site of a destructive change or addition need to belong to the same generation as the top node of the tree. The rest of the structure can consist of old nodes. For example, suppose we add a new feature, say [gender: femJ to the value of agr in Figure 3 to yield the feature set in", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF6": { |
| "text": "Figure 4.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF7": { |
| "text": "we want the change to affect only the copy but not the original feature set. In terms of the trees that we have constructed for the example in Figure 3, this involves adding one new cell to the copied structure to hold the value fem, and changing the content of cell 3 by adding the new feature to it.The modified copy and its relation to the original is shown inFigure S. Note that one half of the structure is shared. The copy contains only three new nodes.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF8": { |
| "text": "Figure 6.b). The lowest common ancestor 2 (binary 10) is designated by the longest common initial substring of 9 (binary 1001) and 11 (binary 1011). The relative index of 11, with respect to, 7 (binary 111), is the rest of its index with 1 prefixed to the front.In terms of number of links traversed, relative addresses have no statistical advantage over the simpler method of always starting from the top.However, they have one important property that is essential for our purposes: relative addresses remain valid even when trees are embedded ~n other trees; absolute indices would have to be recalculated.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF9": { |
| "text": "Figure 7 is a recoding of Figure S using relative addresses.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF10": { |
| "text": "Figure 8 a. [-cat: np I person: 3rd II Lagr: I-number: sg-~ Lgender : fem~J", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF11": { |
| "text": "In 9b, a copy of 8.b has been embedded as node 6 of the host tree. The original indices of both trees remain unchanged. Because all the addresses are relative; no harm comes from the fact that indices in the embedded tree no longer correspond to the true location of the nodes. Absolute indices are not used as addresses because they change when a tree is embedded. The symbol -> in node 2 of the lower tree indicates that the original content of this node--<jender 1,3~has been replaced by the address of the cell that it was unified with, namely cell 3 in the host tree.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "FIGREF12": { |
| "text": "Pereira's paper at this meeting. The three alternatives involve different trade-offs along the space/time continuum. The choice between them wdl depend on the particular application they are intended for. No statistics on parsing are avadable yet but we hope to have some in the final version.", |
| "num": null, |
| "uris": null, |
| "type_str": "figure" |
| }, |
| "TABREF1": { |
| "text": "from the binary representation of its index by starting after the first 1 in this number and taking 0 to be a signal for a left turn and 1 as a mark for a right turn. For example, starting at node 1, node S is reached by first going down a left branch and then a right branch. This sequence of turns corresponds to the digits 01. Prefixed with 1, this is the same as the", |
| "html": null, |
| "type_str": "table", |
| "num": null, |
| "content": "<table><tr><td>binary representation of 5, namely 101. The same</td></tr><tr><td>holds for all indices. Thus the path to node 9 (binary</td></tr><tr><td>1001) would be LEFT-LEFT-RIGHT as signalled by the</td></tr><tr><td>last three digits following the initial 1 in the binary</td></tr><tr><td>numeral (see</td></tr><tr><td>Each cell contains either an atomic value or a set of</td></tr><tr><td>pairs that associate attribute names with indices of</td></tr><tr><td>cells where their value is stored. The assignment of</td></tr><tr><td>vaiues to storage cells is arbitrary; =t doesn't matter</td></tr><tr><td>which cell stores which value. Here, cell 1 conta,ns the</td></tr><tr><td>information that the value of the at\"tribute cat is</td></tr><tr><td>found in ceil 2 and that of agr in cell 3. This is a slight</td></tr><tr><td>simplification. As we shall shortly see, when the value</td></tr><tr><td>in a cell involves a reference to another cell, that</td></tr><tr><td>reference is encoded as a relative index.</td></tr></table>" |
| } |
| } |
| } |
| } |