File size: 31,530 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 | {
"paper_id": "C82-1007",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T13:12:47.160983Z"
},
"title": "",
"authors": [
{
"first": "James",
"middle": [],
"last": "Bradford",
"suffix": "",
"affiliation": {
"laboratory": "",
"institution": "Acadia Unfvers\u00a3ty Wolfville",
"location": {
"country": "Nova Scotia Canada"
}
},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "A distance function is proposed that maps pairs of strings to the real numbers. It has been shown that given suitable constraints the function is a metric over the free monoid generated from a set of gr~um~ matical symbols. The necessary constraints modify the metric so that it maps pairs of strings to a lattice of real numbers. Thus for each string the metric defines a countable set of nested neighbourhoods. This aspect of the space has proved useful for the correction of certain kinds of grammatical errors that occur in English sentences. An English parser was written that used the metric to propose corrections to a variety of ungrammatical sentences. Experience with the program suggests that in many cases the intuitive notion of grammatical similarity corresponds closely to the mathematical definition of nearest neighbour in the space. I.",
"pdf_parse": {
"paper_id": "C82-1007",
"_pdf_hash": "",
"abstract": [
{
"text": "A distance function is proposed that maps pairs of strings to the real numbers. It has been shown that given suitable constraints the function is a metric over the free monoid generated from a set of gr~um~ matical symbols. The necessary constraints modify the metric so that it maps pairs of strings to a lattice of real numbers. Thus for each string the metric defines a countable set of nested neighbourhoods. This aspect of the space has proved useful for the correction of certain kinds of grammatical errors that occur in English sentences. An English parser was written that used the metric to propose corrections to a variety of ungrammatical sentences. Experience with the program suggests that in many cases the intuitive notion of grammatical similarity corresponds closely to the mathematical definition of nearest neighbour in the space. I.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "Consider a string of grammatical symbols which has been produced by lexical analysis.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": null
},
{
"text": "Each symbol in the string corresponds to a word in the original sentence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": null
},
{
"text": "The string will be analysed by a parser which compares the sequence of symbols to sequences specified by some grammar, G.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": null
},
{
"text": "If the comparison succeeds then the original sentence is accepted as grammatical. L Otherwise, it is rejected and error correction is required.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": null
},
{
"text": "Given a grammar G and a string S composed of grammatical symbols from some alphabet A then S is ungrammatical if it is not contained in L(G), the language generated by G.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "Ungrammatical in this sense refers to any sentence that was not anticipated by the grammar. In many systems it is possible for a user to produce a proper English sentence within the appropriate domain of discourse and still have the sentence rejected by the parser. This is usually attributed to \"holes in the grammar.\"",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "This paper will describe a technique for correcting ungrammatical input. The class of errors treated includes both genuine gramma~ tical errors and those resulting from \"holes.\"",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "One of the assumptions tested by this work is that a significant class of errors can be resolved by examination of syntactic structure alone.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "An ungrammatical sentence is viewed as a grammatical sentence that has been transformed by one or more error operations.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "An error operation involves either (a) an insertion of a word, (91 a de~I-on of a word, or (c) an alteration of the word sequence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "In general, the damage done by a single error operat\u00a3on is local and does not significantly alter the gloSal structure.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "Thus a comparison of the respective structures of the two sentences is used as the bases for a measure of theZr similarity.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "This approach is based on earlier work by Fischer and Wagner. ~ The error correction strategy rests on a measure which expresses structural similarity as a numerical distance.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "If the parser~s analysis of a of a given sentence fa~is then a search is made for its nearest grammatical neighbour.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "As various alternatives are found they are presented to the user.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "The user may elect to continue the search, accept the corrector~s proposal or abandon the search and rephrase the input.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "The class of errors that can be corrected by a measure of structural similarity are those related to word arrangement.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "Word arrangement is described by an augmented transition network in which the conditions on the arcs are totally relaxed.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "Such a net is called a recursive transition network and it defines a context free language~ Thus the class of errors treated by this technique are called context free errors.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Definition:",
"sec_num": null
},
{
"text": "The Measure -Informally",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The basis of the distance function is a value called the'transformation cost.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "In essence the transformation cost gives an indication of the number of changes required to convert one string of grammatical symbols into another.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The changes are considered under two categories, rearrangement and edition.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The cost of a transformation is the sum of the cost of rearrangment and cost of edition.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The rearrangement cost measures the amount of disorder of one string relative to another.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Many definitions are possible but most yield asymmetrical costs.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "One that does not, considers common substrings between the two given strings.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The cost is based on the number of gaps between the substrings.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "For example, if the two given strings match exactly then the rearrangement cost is zero because the two strings match without gaps.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The edition cost considers the symbols that occupy the gaps between subs~",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "In order to transform one string into another the symbols not part of common substrings in the first must be removed and those in the second that are not common must be inserted into the first.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The edition cost is the sum of the costs of insertion and deletion.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Clearly the potential for asymmetry exists here as well. However, if the cost of insertion is equal to the cost of deletion for any given symbol then symmetry follows as a consequence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The most significant element of the formal description of Eta's distance measure is the concept of a match set.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Suppose we consider two sequences of words (actually strings of grammatical svmbols, each corresponding to a word).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The A-sequence will be the input and the B-sequence will be a sentence in the grammar -henceforth called the test sentence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Thus a match set M with respect to A and B describes a palrlng between words in the input and words in the test sentence.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "If the two sentences match exactly and are both of length n then the match set denoting the best match will be: (1,1),(2,2), ...,(n,n).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Notice that the integers comprising each ordered pair are the positions of words in the two respective sentences.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The rearrangement cost (which measures the disorder of one sentence relative to another) is computed from M.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Although the cost is related to the number of common substrings of words shared by the two given sentences the actual cost is computed by counting gaps between substrings.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "For example, suppose two sentences have no words in common.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Since there are no shared substrings the word order of the two sentences are not related and thus the rearrangement cost is zero (hence the entire transformation cost will derive from the edit cost).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "If the two sentences were identical then in this case as well there will exist a match set yielding a rearrangment cost of zero.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The edit cost is also computed from the match set M.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "In a manner similar to the Fischer/Wagner measure it is assumed that each grammatical symbol has two associated unit costs, the cost of insertion and the cost of deletion.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The underlying idea is t-~ ~ter the input has ~-6en rearranged to match the test sentence then nonmatching symbols in the input are removed and unmatched symbols in the test sentence are inserted into the modified input.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "In practice it is the sum of the unit costs that is used as the edit cost.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Because of the nonnegativity and nondegeneracy requirements for a metric the unit edit costs must be positive.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The Measure -Formally Notation I. If A is a set then the cardinality of A is denoted",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "3.",
"sec_num": null
},
{
"text": "If m = (i,j) is an ordered pair of integers then D(m) = i and R(m) = j = .",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": ".. 3.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "-Ifs S. wh~e l~i~ is a sequence of symbols then s<i > l If M is a given match set with respect to two strings A and B then M -I is a match set with respect to B and A such that",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "1. IM-II=IMII 2. meM\u00f73n~M- where (i)D(m)=R(n) (ii)R(m)=D(n)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "a match set MeUAR is said to be a match set of minimal cost (or simply \"minimal\") i~f TCOST ( A program called Eta (for Error Tolerant Analysis) was written to test the effectiveness of the measure. For a given grammar, G the program searches the metric space in the neighbourhood of the input until a sentence contained in L(G) is found.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "This sentence is given to the user for confirmation.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "If the program's proposal is rejected then the search is continued.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The neighbourhood searched by the program consists of the set of strings of grammatical symbols within a given distance of the input.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "By progressively enlarging this distance a partial ordering is applied to the strings in L(G). Thus the user sees alternatives from \"near\" (structurally similar to the input) to \"far\" (structurally dissimilar).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Experience with the program suggests that many common grammatical errors can be corrected by relatively short dialogues with the user. Frequently an acceptable alternative ~s proposed w~thin three or four interactions.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "The extent to which the alternatives proposed by Eta are \"likely\" is, of course, subjective.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Nevertheless, the measure does yield alternatives that are structurally similar to input that would otherwise defy analysis.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "In the majority of the cases seen, grammatical errors do leave much of a sentence's structure intact.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "Since there is no fixed limit on the number of alternatives that may be presented even pathological cases are correctable with patience.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "[1]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "[2]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
},
{
"text": "[3]",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "2.",
"sec_num": null
}
],
"back_matter": [
{
"text": "If a,b and n are integers such that a+b<2n then a+nb = ~a+b if a+b<n [a+b-n if a~b>n Notice that if a+b~2n then a+ b = [(a+b-l) mod n]+l n Definition 3 Successor Function, succ(m)If M is a match set with respect to two strings A and B and if IAI = a, IBl=b and (i,j)eM then succ((i,j)) = (i+al,J+bl)Recall that the rearrangement cost is based on the number of gaps between substrings. A gap is detected by means of a successor function.The successor of an ordered pair is the pair produced by incrementing each element of the initial pair by i.Thus the successor of (2,3) is (3,4).An unusual aspect of the successor function is that for any given sentence, the first word is defined to be the successor of the last. For example, if the length of the two sentences was n, then the successor of (n,n) is defined to be (i,i).A metric must yield a distance from a string to itself of zero. This is the reason underlying the successor function's \"wrap around\" characteristic. In other words the cost of a unit edit operation is independent of the symbol being edited.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Notation",
"sec_num": null
},
{
"text": "Let E be an alphabet of symbols and c be a positive real constant.Convention 1 requires VSeZyINS(s)=TDEL(s)=cRecall that the edit cost between two strings A and B is based on the unit costs of inserting and deleting symbols not common to both strings. A definition of the edit cost, F(A,B,M) based on this is given in reference 3.For two strings A and B and a given match set M, Lemma 1 establishes the equivalence of a more convenient definition. The proof of Lemma 1 is also given in reference 3.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Convention 1",
"sec_num": null
},
{
"text": "If M is a match set with respect to two strings A and B and if convention 1 is in force then F(A,B,M)=(IAI+IBI-21MI)c If UAB is the class of all match sets with respect to A and B then",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Lemma 1",
"sec_num": null
}
],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "The String to String Correction Problem",
"authors": [
{
"first": "M",
"middle": [
"J"
],
"last": "Fischer",
"suffix": ""
},
{
"first": "R",
"middle": [
"A"
],
"last": "Wagner",
"suffix": ""
}
],
"year": 1974,
"venue": "Journal of the ACM",
"volume": "21",
"issue": "I",
"pages": "168--173",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Fischer, M. J. and Wagner, R. A., The String to String Correction Problem, Journal of the ACM, Vol. 21, no. I. January 1974, 168 -173.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": "Transition Netword Grammars for Natural Lanuage Analysis",
"authors": [
{
"first": "W",
"middle": [
"A"
],
"last": "Woods",
"suffix": ""
}
],
"year": 1970,
"venue": "Ccmuntunications of the ACM",
"volume": "13",
"issue": "i0",
"pages": "591--606",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Woods, W. A., Transition Netword Grammars for Natural Lanuage Analysis, Ccmuntunications of the ACM, Vol. 13, no. i0, October 1970, 591 -606.",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "The Eta Interface -An Error Correcting Parser for Augmented Transition Networds",
"authors": [
{
"first": "J",
"middle": [
"H"
],
"last": "Bradford",
"suffix": ""
}
],
"year": 1982,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Bradford, J. H., The Eta Interface -An Error Correcting Parser for Augmented Transition Networds, Ph.D. Thesis, Dpeartment of Computer Science, University of Waterloo, 1982.",
"links": null
}
},
"ref_entries": {
"FIGREF0": {
"type_str": "figure",
"uris": null,
"text": "B are given strings then a match set M with respect to A and B is a set of ordered pairs of integers with the following properties.If m,n eM and m~n then i. Dfm) e[l",
"num": null
}
}
}
} |