File size: 55,598 Bytes
6fa4bc9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | {
"paper_id": "P91-1012",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T09:03:39.920749Z"
},
"title": "COMPOSE-REWUCE PARSING",
"authors": [
{
"first": "Henry",
"middle": [
"S"
],
"last": "Thompson1",
"suffix": "",
"affiliation": {
"laboratory": "",
"institution": "Human Communication Research Centre University of Edinburgh",
"location": {}
},
"email": ""
},
{
"first": "Mike",
"middle": [],
"last": "Dixon2",
"suffix": "",
"affiliation": {
"laboratory": "",
"institution": "Buccleuch Place",
"location": {
"postCode": "EH8 9LW",
"settlement": "Edinburgh",
"country": "SCOTLAND"
}
},
"email": ""
},
{
"first": "John",
"middle": [],
"last": "Lamping2",
"suffix": "",
"affiliation": {
"laboratory": "",
"institution": "Buccleuch Place",
"location": {
"postCode": "EH8 9LW",
"settlement": "Edinburgh",
"country": "SCOTLAND"
}
},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "Two new parsing algorithms for context-free phrase structure grammars are presented which perform a bounded amount of processing per word per analysis path, independently of sentence length. They are thus capable of parsing in real-time in a parallel implementation which forks processors in response to non-deterministic choice points.",
"pdf_parse": {
"paper_id": "P91-1012",
"_pdf_hash": "",
"abstract": [
{
"text": "Two new parsing algorithms for context-free phrase structure grammars are presented which perform a bounded amount of processing per word per analysis path, independently of sentence length. They are thus capable of parsing in real-time in a parallel implementation which forks processors in response to non-deterministic choice points.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "The work reported here grew out of our attempt to improve on the o (n 2) performance of the SIMD parallel parser described in (Thompson 1991) . Rather than start with a commitment to a specific SIMD architecture, as that work had, we agreed that the best place to start was with a more abstract architecture-independent consideration of the CF-PSG parsing problem-given arbitrary resources, what algorithms could one envisage which could recognise and/or parse atomic category phrase-structure grammars in o (n) ? In the end, two quite different approaches emerged. One took as its starting point non-deterministic shift-reduce parsing, and sought to achieve linear (indeed real-time) complexity by performing a constant-time step per word of the input. The other took as its starting point tabular parsing (Earley, C KY), and sought to achieve linear complexity by performing a constant-time step for the identification/construction of constituents of each length from 0 to n. The latter route has been widely canvassed, although to our knowledge has not yet been implemented--see (Nijholt 1989, 90) for extensive references. The former route, whereby real-time parsing is achieved by processor forking at non-deterministic choice points in an extended shill-reduce parser, is to our knowledge new. In this paper we present outlines of two such parsers, which we call compose-reduce parsers.",
"cite_spans": [
{
"start": 126,
"end": 141,
"text": "(Thompson 1991)",
"ref_id": "BIBREF5"
},
{
"start": 1082,
"end": 1100,
"text": "(Nijholt 1989, 90)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "INTRODUCTION",
"sec_num": "0."
},
{
"text": "Why couldn't a simple breadthfirst chart parser achieve linear performance on an appropriate parallel system? If you provided enough processors to immediately process all agenda entries as they were created, would not this give the desired result? No, because the processing of a single word might require many serialised steps. Consider processing the word \"park\" in the sentence \"The people who ran in the park got wet.\" Given a simple traditional sort of grammar, that word completes an sP, which in turn completes a P P, which in turn completes a vP, which in turn completes an s, which in turn completes a REL, which in turn completes an NP. The construction/recognition of these constituents is necessarily serialised, so regardless of the number of processors available a constant-time step is impossible. (Note that this only precludes a real-time parse by this route, but not necessarily a linear one.) In the shift-reduce approach to parsing, all this means is that for non-linear grammars, a single shift step may be followed by many reduce steps. This in turn suggested the beginnings of a way out, based on categorial grammar, namely that multiple reduces can be avoided if composition is allowed.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "To return to our example above, in a simple shift-reduce parser we would have had all the words preceding the word \"park\" in the stack. When it was shifted in, there would follow six reduce steps. If alternatively following a shift step one was allowed (non-deterministically) a compose step, this could be reduced (!) to a single reduce step. Restricting ourselves to a simpler example, consider just \"run in the park\" as a vv, given rules",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "VP --) v PP NP --) d n PP --) p NP.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "With a composition step allowed, the parse would then proceed as follows:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "Shift run as a v Shift in as a p",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "Compose v and p to give [vP v [PP p \u2022 NP] ] where I use a combination of bracketed strings and the 'dotted rule' notation to indicate the result of composition. The categorial equivalent would have been to notate v as vP/P P, P as PP/NP, and the result of the composition as therefore vP/NP.",
"cite_spans": [
{
"start": 24,
"end": 41,
"text": "[vP v [PP p \u2022 NP]",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "L COMPOSE-Rk~nUCE PARSING",
"sec_num": null
},
{
"text": "Compose the dotted vp with d to give",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Shift the as d",
"sec_num": null
},
{
"text": "[VP v [PP p [NP d \u2022 n]]]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Shift the as d",
"sec_num": null
},
{
"text": "Shift park as n Reduce the dotted vp with n to give the complete result. Although a number of details remained to be worked out, this simple move of allowing composition was the enabling step to achieving o(n) parsing. Parallelism would arise by forking processors at each non-deterministic choice point, following the general model of Dixon's earlier work on parallelising the ATMS (Dixon & de Kleer 1988) .",
"cite_spans": [
{
"start": 383,
"end": 406,
"text": "(Dixon & de Kleer 1988)",
"ref_id": "BIBREF0"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Shift the as d",
"sec_num": null
},
{
"text": "Simply allowing composition is not in itself sufficient to achieve o (n) performance. Some means of guaranteeing that each step is constant time must still be provided. Here we found two different ways forward.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Shift the as d",
"sec_num": null
},
{
"text": "In this parser there is no stack. We have simply a current structure, which corresponds to the top node of the stack in a normal shift-reduce parser. This is achieved by extending the appeal to composition to include a form of left-embedded raising, which will be discussed further below. Special attention is also required to handle left-recursive rules.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II. TEn~. FIRST COMPOSE-REDUCE PARSER---CR4",
"sec_num": null
},
{
"text": "The constant-time parsing step is given below (slightly simplified, in that empty productions and some unit productions are not handled). In this algorithm schema, and in subsequent discussion, the annotation \"ND\" will be used in situations where a number of alternatives are (or may be) described. The meaning is that these alternatives are to be pursued non-deterministically.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.1 The Basic Parsing Algorithm",
"sec_num": null
},
{
"text": "1 Shift the next word; 2 ND look it up in the lexicon; 3 ND close the resulting category wrt the unit productions; 4a ND reduce the resulting category with the current structure or 4b N D raise* the resulting category wrt the non-unary rules in the grammar for which it is a left corner, and compose the result with the current structure. If reduction ever completes a category which is marked as the left corner of one or more left-recursive rules or rule sequences, ND raise* in place wrt those rules (sequences), and propagate the marking. Some of these ND steps may at various points produce complete structures. If .the input is exhausted, then those structures are parses, or not, depending on whether or not they have reached the distinguished symbol. If the input is not exhausted, it is of course the incomplete structures, the results of composition or raising, which are carried forward to the next step.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "The operation referred to above as \"raise*\" is more than simple raising, as was involved in the simple example in section IV. In order to allow for all possible compositions to take place all possible left-embedded raising must be pursued.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "Consider the following grammar fragment:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "S ~NP VP VP -~ v NP CMP CMP --)that S NP -~ propn NP -+ dn",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "and the utterance \"Kim told Robin that the child likes Kim\".",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "If we ignore all the ND incorrect paths, the current structure after the \"that\" has been processed is",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "[S [NP [propn Kim]] [VP [v told] [NP [propn Robin] ] [CMP that \u2022 S] ] ]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "In order for the next word, \"the\", to be correctly processed, it must be raised all the way to s, namely we",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "must have [S [NP [d the] \u2022 n] VP]]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "to compose with the current structure. What this means is that for every entry in the normal bottom-up reachability table pairing a left corner with a top category, we need a set of dotted structures, corresponding to all the ways the grammar can get from that left corner to that top category. It is these structures which are ND made available in step 4b of the parsing step algorithm CR-I above.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithm CR-I",
"sec_num": null
},
{
"text": "Now this in itself is not sufficient to handle left recursive structures, since by definition there could be an arbitrary number of left-embeddings of a left-recursive structure.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "The final note in the description of algorithm CR-I above is designed to handle this. Glossing over some subtleties, left-recursion is handled by marking some of the structures introduced in step 3b, and ND raising in place if the marked structure is ever completed by reduction in the course of a parse. Consider the sentence ~Robin likes the child's dog.\" We add the following two rules to the grammar:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "D -9 art D -9 NP 's",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "thereby transforming D from a preterminal to a non-terminal. When we shift \"the\", we will raise to inter alia",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "[NP [D [art the]] \u2022 n] r",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "with the NP marked for potential reraising. This structure will be composed with the then current structure to produce which will then take us through the rest of the sentence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "One final detail needs to be cleared up. Although directly left-recursive rules, such as e.g. NP -9 NP PP, are correctly dealt with by the above mechanism, indirectly left-recursive sets of rules, such as the one exemplified above, require one additional subtlety. Care must be taken not to introduce the potential for spurious ambiguity. We will introduce the full details in the next section.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.2 Handling Left Recursion",
"sec_num": null
},
{
"text": "Steps 3 and 4b of CR-I require tables of partial structures: Closures of unit productions up from pre-terminals, for step 3; left-reachable raisings up from (unit production closures of) preterminals, for step 4b. In this section we discuss the creation of the necessary tables, in particular Raise*, against the background of a simple exemplary grammar, given below as Table 1 .",
"cite_spans": [],
"ref_spans": [
{
"start": 370,
"end": 377,
"text": "Table 1",
"ref_id": "TABREF1"
}
],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "We have grouped the rules according to type--two kinds of unit productions (from pre-terminals or non-terminals), two kinds of left recursive rules (direct and indirect) and the remainder. As a first step towards computing the table which step 4b above would use, we can pre-compute the partial structures given above in Table 2. c l* contains all backbone fragments constructable from the unit productions, and is already essentially what we require for step 3 of the algorithm. LRdir contains all directly leftrecursive structures. LRindir2 contains all indirectly left-recursive structures involving exactly two rules, and there might be LRindir3, 4,... as well. R s* contains all non-recursive tree fragments constructable from leftembedding of binary or greater rules and non-terminal unit productions. The superscripts denote loci where left-recursion may be appropriate, and identify the relevant structures.",
"cite_spans": [],
"ref_spans": [
{
"start": 321,
"end": 329,
"text": "Table 2.",
"ref_id": null
}
],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "v \u2022 NP] 3 [NP [D~ \" rill'2 \u2022 [S [NF J-D art] \" n]l'2 VP] [D [Np pr\u00b0pn]l \" 's]4, [S [NP P r\u00b0pn]l'2 \" VP]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "In order to get the full Raise* table needed for step 4b, first we need to project the non-terminal left daughters of rules such as [ s NpI' 2 VP ] down to terminal left daughters. We achieve this by substituting terminal entries from Cl* wherever we can in LRdir, LRindir2 and Rs* to give us Table 3 from Table 2 (new embeddings are underlined) .",
"cite_spans": [],
"ref_spans": [
{
"start": 293,
"end": 347,
"text": "Table 3 from Table 2 (new embeddings are underlined)",
"ref_id": "TABREF2"
}
],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "Left recursion has one remaining problem for us. Algorithm CR-I only checks for annotations and ND raises in place after a reduction completes a constituent. But in the last line of Ras* above there are unit constituents with annotations. Being already complete, they will not ever be completed, and consequently the annotations will never be checked. So we pre-compute the desired result, augmenting the above list with expansions of those units via the indicated left recursions. This gives us the final version of Raise *, now shown with dots included, in Table 4 .",
"cite_spans": [],
"ref_spans": [
{
"start": 559,
"end": 566,
"text": "Table 4",
"ref_id": "TABREF3"
}
],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "This table is now suited to its role in the algorithm. Every entry has a lexical left daughter, all annotated constituents are incomplete, and all unit productions are factored in. It is interesting to note that with these tree fragments, taken together with the terminal entries in Cl*, as the initial trees and LRdir, LRindir2 , etc. as the auxiliary trees we have a Tree Adjoining Grammar (Joshi 1985) which is strongly equivalent to the CF-PSG we started with. We might call it the left-lexical TAG for that CF-PSG, after Schabes et al. (1988) . Note further that if a TAG parser respected the annotations as restricting adjunction, no spuriously ambiguous parses would be produced.",
"cite_spans": [
{
"start": 392,
"end": 404,
"text": "(Joshi 1985)",
"ref_id": "BIBREF2"
},
{
"start": 526,
"end": 547,
"text": "Schabes et al. (1988)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "Indeed it was via this relationship with TAGs that the details were worked out of how the annotations are distributed, not presented here to conserve space.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.3 Nature of the required tables",
"sec_num": null
},
{
"text": "Only a serial pseudo-parallel implementation has been written. Because of the high degree of precomputation of structure, this version even though serialised runs quite efficiently. There is very little computation at each step, as it is straight-forward to double index the mai s e* table so that only structures which will compose with the current structure are retrieved.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.4 Implementation and Efficiency",
"sec_num": null
},
{
"text": "The price one pays for this efficiency, whether in serial or parallel versions, is that only left-common structure is shared. Right-common structure, as for instance in P P attachment ambiguity, is not shared between analysis paths. This causes no difficulties for the parallel approach in one sense, in that it does not compromise the real-time performance of the parser. Indeed, it is precisely because no recombination is attempted that the basic parsing step is constant time. But it does mean that if the CF-PSG being parsed is the first half of a two step process, in which additional con-straints are solved in the second pass, then the duplication of structure will give rise to duplication of effort. Any parallel parser which adopts the strategy of forking at non-deterministic choice points will suffer from this weakness, including CR-II below.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "II.4 Implementation and Efficiency",
"sec_num": null
},
{
"text": "Our second approach to composereduce parsing differs from the first in retaining a stack, having a more complex basic parsing step, while requiring far less pre-processing of the grammar. In particular, no special treatment is required for left-recursive rules. Nevertheless, the basic step is still constant time, and despite the stack there is no potential processing 'balloon' at the end of the input.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III. THE SECOND COMPOSE-R~nUCE PARSER CR-II",
"sec_num": null
},
{
"text": "Algorithm CR-II 1 Shift the next word; 2 ND look it up in the lexicon; 3 ND close the resulting category wrt the unit productions; 4 N D reduce the resulting category with the top of the stack--if results are complete and there is input remaining, pop the stack; 5a N D raise the results of (2),",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III. 1 The Basic Parsing Algorithm",
"sec_num": null
},
{
"text": "(3) and, where complete, (4) and 5b N D either push the result onto the stack or 5c N D compose the result with the top of the stack, replacing it.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III. 1 The Basic Parsing Algorithm",
"sec_num": null
},
{
"text": "This is not an easy algorithm to understand. In the next section we present a number of different ways of motivating it, together with an illustrative example.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III. 1 The Basic Parsing Algorithm",
"sec_num": null
},
{
"text": "Let us first consider how CR-II will operate on purely left-branching and purely right-branching structures. In each case we will consider the sequence of algorithm steps along the non-deterministically correct path, ignoring the others. We will also restrict ourselves to considering binary branching rules, as pre-terminal unit productions are handled entirely by step 3 of the algorithm, and non-terminal unit productions must be factored into the grammar. On the other hand, interior daughters of non-binary nodes are all handled by step 4 without changing the depth of the stack.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.2 CR-II Explained",
"sec_num": null
},
{
"text": "For a purely left-branching structure, the first word will be processed by steps 1, 2, 5a and 5b, producing a stack with one entry which we can schematise as in Figure 1 , where filled circles are processed nodes and unfilled ones are waiting. Figure 1 . All subsequent words except the last will be processed by steps 4, 5a and 5b (here and subsequently we will not mention steps 1 and 2, which occur for all words), effectively replacing the previous sole entry in the stack with the one given in Figure 2 . It should be evident that the cycle of steps 4, 5a and 5b constructs a leftbranching structure of increasing depth as the sole stack entry, with one right daughter, of the top node, waiting to be filled. The last input word of course is simply processed by step 4 and, as there is no further input, left on the stack as the final result. The complete sequence of steps for any leftbranching analysis is thus raiseJre-duce&raise*--reduce.",
"cite_spans": [],
"ref_spans": [
{
"start": 161,
"end": 169,
"text": "Figure 1",
"ref_id": "FIGREF2"
},
{
"start": 244,
"end": 252,
"text": "Figure 1",
"ref_id": "FIGREF2"
},
{
"start": 499,
"end": 507,
"text": "Figure 2",
"ref_id": null
}
],
"eq_spans": [],
"section": "III.2.1 Left-branching analysis",
"sec_num": null
},
{
"text": "An ordinary shift-reduce or left-corner parser would go through the same sequence of steps.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.2.1 Left-branching analysis",
"sec_num": null
},
{
"text": "The first word of a purely rightbranching structure is analysed exactly as for a left-branching one, that is, with 5a and 5b, with results as in Again it should be evident that cycling steps 5a and 5c will construct a right-branching structure of increasing depth as the sole stack entry, with one right daughter, of the most embedded node, waiting to be filled. Again, the last input word will be processed by step 4. The complete sequence of steps for any right-branching analysis is thus raisem raise&compose*--reduce. A categorial grammar parser with a composefirst strategy would go through an isomorphic sequence of steps.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.2.2 Right-branching analysis",
"sec_num": null
},
{
"text": "All the steps in algorithm CR-II have now been illustrated, but we have yet to see the stack grow beyond one entry. This will occur in where an individual word, as opposed to a completed complex constituent, is processed by steps 5a and 5b, that is, where steps 5a and 5b apply other than to the results of step 4.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.2.3 Mixed Left-and Right-branching Analysis",
"sec_num": null
},
{
"text": "Consider for instance the sentence \"the child believes that the dog likes biscuits. ~ With a grammar which I trust will be obvious, we would arrive at the structure shown in Figure 5 after processing \"the child believes that ~, having done raise--reduce& raiseJraise&compose--raise&compose, that is, a bit of leftbranching analysis, followed by a bit of right-branching analysis. thai Flr~hle~ir~ili~[::~: be dorieS the child believes t~ v~p with \"the\" which will allow immediate integration with this. The ND correct path applies steps 5a and 5b, raise&push, giving a stack as shown in Figure 6 : Figure 6 . We can then apply steps 4, 5a and 5c, reduce&raise&compose, to \"dog\", with the result shown in Figure 7 . This puts uss back on the standard right-branching path for the rest of the sentence.",
"cite_spans": [],
"ref_spans": [
{
"start": 174,
"end": 182,
"text": "Figure 5",
"ref_id": null
},
{
"start": 587,
"end": 595,
"text": "Figure 6",
"ref_id": null
},
{
"start": 598,
"end": 606,
"text": "Figure 6",
"ref_id": null
},
{
"start": 704,
"end": 712,
"text": "Figure 7",
"ref_id": null
}
],
"eq_spans": [],
"section": "III.2.3 Mixed Left-and Right-branching Analysis",
"sec_num": null
},
{
"text": "the dog Figure 7 .",
"cite_spans": [],
"ref_spans": [
{
"start": 8,
"end": 16,
"text": "Figure 7",
"ref_id": null
}
],
"eq_spans": [],
"section": "III.2.3 Mixed Left-and Right-branching Analysis",
"sec_num": null
},
{
"text": "Returning to a question raised earlier, we can now see how a chart parser could be modified in order to run in real-time given enough processors to empty the agenda as fast as it is filled. We can reproduce the processing of CR-II within the active chart parsing framework by two modifications to the fundamental rule (see e.g. Gazdar and Mellish 1989 or Thompson and Ritchie 1984 for a tutorial introduction to active chart parsing). First we restrict its normal operation, in which an active and an inactive edge are combined, to apply only in the case of pre-terminal inactive edges. This corresponds to the fact that in CR-II step 4, the reduction step, applies only to pre-terminal categories (continuing to ignore unit productions). Secondly we allow the fundamental rule to combine two active edges, provided the category to be produced by one is what is required by the other. This effects composition. If we now run our chart parser left-to-right, left-corner and breadth-first, it will duplicate CR-II.",
"cite_spans": [
{
"start": 328,
"end": 338,
"text": "Gazdar and",
"ref_id": "BIBREF1"
},
{
"start": 339,
"end": 367,
"text": "Mellish 1989 or Thompson and",
"ref_id": null
},
{
"start": 368,
"end": 380,
"text": "Ritchie 1984",
"ref_id": "BIBREF6"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "III.3 An Alternative View of CR-II",
"sec_num": null
},
{
"text": "The maximum number of edges along a given analysis path which can be introduced by the processing of a single word is now at most four, corresponding to steps 2, 4, 5a and 5c of CR-IIDthe pre-terminal itself, a constituent completed by it, an active edge containing that constituent as left daughter, created by left-corner rule invocation, and a further active edge combining that one with one to its left. This in turn means that there is a fixed limit to the amount of processing required for each word.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.3 An Alternative View of CR-II",
"sec_num": null
},
{
"text": "Although clearly not benefiting from as much pre-computation of structure as CR-I, CR-II is also quite efficient.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.4 Implementation and Efficiency",
"sec_num": null
},
{
"text": "Two modifications can be added to improve efficiencyDa reachability filter on step 5b, and a shaper test (Kuno 1965) , also on 5b. For the latter, we need simply keep a count of the number of open nodes on the stack (equal to the number of stack entries if all rules are binary), and ensure that this number never exceeds the number of words remaining in the input, as each entry will require a number of words equal to the number of its open nodes to pop it off the stack. This test actually cuts down the number of nondeterministic paths quite dramatically, as the ND optionality of step 5b means that quite deep stacks would otherwise be pursued along some search paths. Again this reduction in search space is of limited significance in a true parallel implementation, but in the serial simulation it makes a big difference.",
"cite_spans": [
{
"start": 105,
"end": 116,
"text": "(Kuno 1965)",
"ref_id": "BIBREF3"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "III.4 Implementation and Efficiency",
"sec_num": null
},
{
"text": "Note also that no attention has been paid to unit productions, which we pre-compute as in CR-I. Furthermore, neither CR-I nor CR-II address empty productions, whose effect would also need to be pre-computed.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "III.4 Implementation and Efficiency",
"sec_num": null
},
{
"text": "Aside from the intrinsic interest in the abstract of real-time parsablility, is there any practical significance to these results. Two drawbacks, one already referred to, certainly restrict their significance. One is that the restriction to atomic category CF-PSGs is crucial the fact that the comparison between a rule element and a node label is atomic and constant time is fundamental. Any move to features or other annotations would put an end to real-time processing. This fact gives added weight to the problem mentioned above in section II,4, that only left-common analysis results are shared between alternatives. Thus if one finesses the atomic category problem by using a parser such as those described here only as the first pass of a two pass system, one is only putting off the payment of the complexity price to the second pass, in the absence to date of any linear time solution to the constraint satisfaction problem. On this basis, one would clearly prefer a parallel CKY/Earley algorithm, which does share all common substructure, to the parsers presented here.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "IV. CONCLUSIONS",
"sec_num": null
},
{
"text": "Nevertheless, there is one class of applications where the left-to-right real-time behaviour of these algorithms may be of practical benefit, namely in speech recognition. Present day systems require on-line availability of syntactic and domainsemantic constraint to limit the search space at lower levels of the system. Hitherto this has meant these constraints must be brought to bear during recognition as some form of regular grammar, either explicitly constructed as such or compiled into. The parsers presented here offer the alternative of parallel application of genuinely context-free grammars directly, with the potential added benefit that, with sufficient processor width, quite high degrees of local ambiguity can be tolerated, such as would arise if (a finite subset of) a feature-based grammar were expanded out into atomic category form.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "IV. CONCLUSIONS",
"sec_num": null
}
],
"back_matter": [
{
"text": "The work reported here was carried out while the first author was a visitor to the Embedded Computation and Natural Language Theory and Technology groups of the Systems Science Laboratory at the Xerox Palo Alto Research Center. These groups provided both the intellectual and material resources required to support our work, for which our thanks.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "ACKNOWLEDGEMENTS",
"sec_num": null
}
],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "Massively Parallel Assumption-based Truth Maintenance",
"authors": [
{
"first": "Mike",
"middle": [],
"last": "Dixon",
"suffix": ""
},
{
"first": "Johan",
"middle": [],
"last": "De Kleer",
"suffix": ""
}
],
"year": 1988,
"venue": "Proceedings of the AAAI-88 National Conference on Artificial Intelligence, also reprinted in Proceedings of the Second International Workshop on Non-Monotonic Reasoning",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Dixon, Mike and de Kleer, Johan. 1988. \"Massively Parallel Assumption-based Truth Maintenance\". In Proceedings of the AAAI-88 National Conference on Artificial Intelligence, also reprinted in Proceedings of the Second International Workshop on Non-Monotonic Reasoning.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": "Natural Language Processing in LISP",
"authors": [
{
"first": "Gerald",
"middle": [],
"last": "Gazdar",
"suffix": ""
},
{
"first": "Chris",
"middle": [],
"last": "Mellish",
"suffix": ""
}
],
"year": 1989,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Gazdar, Gerald and Mellish, Chris. 1989. Natural Language Processing in LISP. Addison- Wesley, Wokingham, England (sic).",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "How Much Context-Sensitivity is Necessary for Characterizing Structural Descriptions--Tree Adjoining Grammars",
"authors": [
{
"first": "Aravind",
"middle": [
"K"
],
"last": "Joshi",
"suffix": ""
}
],
"year": 1985,
"venue": "Natural Language Processing--Theoretical Computational and Psychological Perspectives",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Joshi, Aravind K. 1985. \"How Much Context-Sensitivity is Necessary for Characterizing Structural Descriptions--Tree Adjoining Grammars\". In Dowty, D., Karttunen, L., and Zwicky, A. eds, Natural Language Processing-- Theoretical Computational and Psychological Perspectives.",
"links": null
},
"BIBREF3": {
"ref_id": "b3",
"title": "The predictive analyzer and a path elimination technique",
"authors": [
{
"first": "Susumo",
"middle": [],
"last": "Kuno",
"suffix": ""
}
],
"year": 1965,
"venue": "Communications of the ACM",
"volume": "8",
"issue": "",
"pages": "687--698",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Kuno, Susumo. 1965. \"The predictive analyzer and a path elimination technique\", Communications of the ACM, 8, 687-698.",
"links": null
},
"BIBREF4": {
"ref_id": "b4",
"title": "The CYK-Approach to Serial and Parallel Parsing. Memoranda Informatica 90-13, faculteit der informatica",
"authors": [
{
"first": "Anton",
"middle": [],
"last": "Nijholt",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Anne",
"suffix": ""
},
{
"first": "Aravind",
"middle": [
"K"
],
"last": "Joshi",
"suffix": ""
}
],
"year": 1988,
"venue": "Proceedings of the 12th International Conference on Computational Linguistics",
"volume": "",
"issue": "",
"pages": "82--93",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Nijholt, Anton. 1989. \"Parallel parsing strategies in natural language processing ~. In Tomita, M. ed, Proceedings of the International Workshop on Parsing Technologies, 240-253, Carnegie-Mellon University, Pittsburgh. Nijholt, Anton. 1990. The CYK- Approach to Serial and Parallel Parsing. Memoranda Informatica 90-13, faculteit der informatica, Universiteit Twente, Netherlands. Shabes, Yves, Abeill6, Anne and Joshi, Aravind K. 1988. \"Parsing Strategies with 'Lexicalized' Grammars: Application to Tree Adjoining Grammars\". In Proceedings of the 12th International Conference on Computational Linguistics, 82-93.",
"links": null
},
"BIBREF5": {
"ref_id": "b5",
"title": "Parallel Parsers for Context-Free Grammars--Two Actual Implementations Compared",
"authors": [
{
"first": "Henry",
"middle": [
"S"
],
"last": "Thompson",
"suffix": ""
}
],
"year": 1991,
"venue": "Parallel Models of Natural Language Computation",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Thompson, Henry S. 1991. \"Parallel Parsers for Context-Free Grammars--Two Actual Implementations Compared\". To appear in Adriaens, G. and Hahn, U. eds, Parallel Models of Natural Language Computation, Ablex, Norword NJ.",
"links": null
},
"BIBREF6": {
"ref_id": "b6",
"title": "Techniques for Parsing Natural Language: Two Examples",
"authors": [
{
"first": "Henry",
"middle": [
"S"
],
"last": "Thompson",
"suffix": ""
},
{
"first": "Graeme",
"middle": [
"D"
],
"last": "Ritchie",
"suffix": ""
}
],
"year": 1984,
"venue": "Artificial Intelligence: Tools, Techniques, and Applications. Harper and Row, London. Also DAI Research Paper",
"volume": "183",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Thompson, Henry S. and Ritchie, Graeme D. 1984. \"Techniques for Parsing Natural Language: Two Examples\". In Eisenstadt, M., and O'Shea, T., editors, Artificial Intelligence: Tools, Techniques, and Applications. Harper and Row, London. Also DAI Research Paper 183, Dept. of Artificial Intelligence, Univ. of Edinburgh.",
"links": null
}
},
"ref_entries": {
"FIGREF0": {
"uris": null,
"type_str": "figure",
"num": null,
"text": "vanilla S --) NP VP VP -9 v NP CMP --) cmp S PP -9 prep NP"
},
"FIGREF1": {
"uris": null,
"type_str": "figure",
"num": null,
"text": "Figure 2. It should be evident that the cycle of steps 4, 5a and 5b constructs a leftbranching structure of increasing depth as the sole stack entry, with one right daughter, of the top node, waiting to be filled. The last input word of course is simply processed by step 4 and, as there is no further input, left on the stack as the final result. The complete sequence of steps for any leftbranching analysis is thus raiseJre-duce&raise*--reduce. An ordinary shift-reduce or left-corner parser would go through the same sequence of steps."
},
"FIGREF2": {
"uris": null,
"type_str": "figure",
"num": null,
"text": "repeated here as Figure 3): z% Figure 3. Subsequent words, except the last, are processed via steps 5a and 5c, with the result remaining as the sole stack entry, as in Figure 4."
},
"FIGREF3": {
"uris": null,
"type_str": "figure",
"num": null,
"text": "Figure 4. Again it should be evident that cycling steps 5a and 5c will construct a right-branching structure of increasing depth as the sole stack entry, with one right daughter, of the most embedded node, waiting to be filled. Again, the last input word will be processed by step 4. The complete sequence of steps for any right-branching analysis is thus raisem raise&compose*--reduce. A categorial grammar parser with a composefirst strategy would go through an isomorphic sequence of steps."
},
"TABREF1": {
"num": null,
"content": "<table><tr><td>unitl</td><td>unit2</td><td>ird</td><td>iri</td></tr><tr><td>NP -9 propn</td><td>NP -9 CMP</td><td>NP -9 NP PP</td><td>NP -9 D n</td></tr><tr><td>D -9 art</td><td/><td>VP -9 VP PP</td><td>D --) NP 's</td></tr><tr><td colspan=\"4\">Exemplary grammar in groups by rule type</td></tr></table>",
"type_str": "table",
"html": null,
"text": ""
},
"TABREF2": {
"num": null,
"content": "<table/>",
"type_str": "table",
"html": null,
"text": "Projecting non-terminal left daughters"
},
"TABREF3": {
"num": null,
"content": "<table/>",
"type_str": "table",
"html": null,
"text": "Final form of the structure table Ra i S e"
}
}
}
} |