== English Analysis Grammar (simplified) == == Rules == RULE 01: (BLK):=; (delete the blank space) RULE 02: (%a,D,att)(%b,N):=(%b,att=%a); (if there is a node %a with the features D (determiner) and att (attribute) before a node %b with the feature N (noun), then delete the node %a and copy the value of the attribute "att" from %a to %b) RULE 03: (%a,SAV,att)(%b,J):=(%b,att=%a); (if there is a node %a with the features SAV (specifier adverb) and att (attribute) before a node %b with the feature J (adjective), then delete the node %a and copy the value of the attribute "att" from %a to %b) RULE 04: (%a,"it")(%b,VER,VAL0,3PS):=(%b); (if there is a node %a that is the string "it" before a node %b with the features VER (verb), VAL0 (avalent) and 3PS (third person singular), then delete the node %a) RULE 05: (%a,N,PLR,^@pl):=(%a,+@pl); (if there is a node %a with the features N (noun) and PLR (plural) that does not have the attribute @pl yet, add the attribute @pl to it) RULE 06: (%a,POD)(%b,N):=(%c,+N,pos(%b;%a)); (if there is node %a with the feature POD (possessive determiner) before a node %b with the feature N (noun), create a new node %c, with the feature N (noun); put both the node %a and the node %b inside this new node %c; and link them by a relation pos (possessor) going from %b to %a) RULE 07: (%a,N)(%b,"of")(%c,SPR):=(%d,+N,pos(%a;%c)); (if there is node %a with the feature N (noun) before a node %b that is the string "of" and that is before a node %c with the feature SPR (possessive pronoun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation pos (possessor) going from %a to %c) RULE 08: (%a,NPR)(%b,"of")(%c,N):=(%d,+N,qua(%c;%a)); (if there is node %a with the feature NPR (indefinite pronoun) before a node %b that is the string "of" and that is before a node %c with the feature N (noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation qua (quantifier) going from %c to %a) RULE 09: (%a,N)(%b,"of")(%c,PPN):=(%d,+N,pos(%a;%c)); (if there is node %a with the feature N (noun) before a node %b that is the string "of" and that is before a node %c with the feature PPN (proper noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation pos (possessor) going from %a to %c) RULE 10: (%a,PPN)(%b,"'s")(%c,N):=(%d,+N,pos(%c;%a)); (if there is node %a with the feature PPN (proper noun) before a node %b that is the string "'s" and that is before a node %c with the feature N (noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation pos (possessor) going from %c to %a) RULE 11: (%a,N)(%b,P,att)(%c,N):=(%d,+N,mod(%a;%c,att=%b)); (if there is node %a with the feature N (noun) before a node %b with the features P (preposition) and att (attribute in the dictionary) and that is before a node %c with the feature N (noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; copy the value of the attribute att from %b to %c; and link %a to %c by a relation mod (modification) going from %a to %c) RULE 12: (%a,SAV,^att)(%b,J):=(%c,+J,qua(%b;%a)); (if there is node %a with the feature SAV (specifier adverb) before a node %b with the feature J (adjective): create a new node %c, with the feature J (adjective); put both the node %a and the node %b inside this new node %c; and link them by a relation qua (modification) going from %b to %a) RULE 13: (%a,N)(%b,"and")(%c,N):=(%d,+N,and(%c;%a)); (if there is node %a with the feature N (noun) before a node %b that is the string "and" and that is before the node %c with the feature N (noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation and (conjunction) going from %c to %a) RULE 14: (%a,N)(%b,"or")(%c,N):=(%d,+N,or(%c;%a)); (if there is node %a with the feature N (noun) before a node %b that is the string "or" and that is before the node %c with the feature N (noun): create a new node %d, with the feature N (noun); put both the node %a and the node %c inside this new node %d; and link them by a relation or (conjunction) going from %c to %a) RULE 15: (%a,J)(%b,N):=(%c,+N,mod(%b;%a)); (if there is node %a with the feature J (adjective) before a node %b with the feature N (noun): create a new node %c, with the feature N (noun); put both the node %a and the node %b inside this new node %c; and link them by a relation mod (modification) going from %b to %a) RULE 16: (%a,N)(%b,N):=(%c,+N,mod(%b;%a)); (if there is node %a with the feature N (noun) before a node %b with the feature N (noun): create a new node %c, with the feature N (noun); put both the node %a and the node %b inside this new node %c; and link them by a relation mod (modification) going from %b to %a) RULE 17: (%a,N)(%b,J):=(%c,+N,mod(%a;%b)); (if there is node %a with the feature N (noun) before a node %b with the feature J (adjective): create a new node %c, with the feature N (noun); put both the node %a and the node %b inside this new node %c; and link them by a relation mod (modification) going from %a to %b) RULE 18: (%a,N)(%b,V):=(%c,+V,agt(%b;%a)); (if there is node %a with the feature N (noun) before a node %b with the feature V (verb): create a new node %c, with the feature V (verb); put both the node %a and the node %b inside this new node %c; and link them by a relation agt (agent) going from %b to %a) RULE 19: (%a,AUX,att)(%b,V):=(%b,att=%a); (if there is a node %a with the features AUX (auxiliary verb) and att (attribute) before a node %b with the feature V (verb), then delete the node %a and copy the value of the attribute "att" from %a to %b) RULE 20: (%a,SAV,att)(%b,V):=(%b,att=%a); (if there is a node %a with the features SAV (specifier adverb) and att (attribute) before a node %b with the feature V (verb), then delete the node %a and copy the value of the attribute "att" from %a to %b) RULE 21: (%a,"is")(%b,GER):=(%b,att=@present,att=@progressive); (if there is a node %a that is the string "is" before a node %b with the feature GER (gerund), then delete the node %a and assign the values @present and @progressive to the attribute att of %b) RULE 22: (%a,N)(%b,COP)(%c,J):=(%d,+V,aoj(%c;%a)); (if there is node %a with the feature N (noun) before a node %b with the feature COP (copula) and that is before a node %c with the feature J (adjective): create a new node %d, with the feature V (verb); put both the node %a and the node %c inside this new node %d; and link them by a relation aoj (predicative) going from %c to %a) RULE 20: (%a,V)(%b,FPR):=(%a,att=%reflexive); (if there is a node %a with the feature V (verb) before a node %b with the feature FPR(reflexive pronoun), then delete the node %b and assign the value @reflexive to the attribute "att" of %a) == Zero-attribute entries == No rule is necessary, provided that the corresponding words are in the dictionary. == One-attribute entries == a) determiner (with "att" in the dictionary) + noun: "a book" RULE 01 + RULE 02 0 [a][ ][book] (initial state) 1 [a][book] (after applying rule 01) 2 [book.@indef) (after applying rule 02) b) specifier adverb (with "att" in the dictionary) + adjective: "very beautiful" RULE 01 + RULE 03 0 [very][ ][beautiful] (initial state) 1 [very][beautiful] (after applying rule 01) 2 [beautiful.@plus) (after applying rule 03) c) dummy pronoun (= "it") + verb: "it rains" RULE 01 + RULE 04 0 [it][ ][rains] (initial state) 1 [it][rains] (after applying rule 01) 2 [rains] (after applying rule 04) == Two-attribute entries == d) determiner + noun (with a marked suffix): "the books" RULE 01 + RULE 02 + RULE 05 0 [the][ ][books] (initial state) 1 [the][books] (after applying rule 01) 2 [books.@def] (after applying rule 02) 3 [book.@def.@pl] (after applying rule 05) e) determiner + determiner + noun: "the only book" RULE 01 + RULE 02 0 [all][ ][the][ ][books] (initial state) 1 [the][only][book] (after applying rule 01 twice) 2 [the][book.@only] (after applying rule 02 for the first time) 3 [book.@only.@def] (after applying rule 02 for the second time) == Three-attribute entries == f) determiner + determiner + noun (with a marked suffix): "any more books" RULE 01 + RULE 02 + RULE 05 0 [any][ ][more][ ][books] (initial state) 1 [any][more][books] (after applying rule 01 twice) 2 [any][books.@more] (after applying rule 02 for the first time) 3 [books.@more.@any] (after applying rule 02 for the second time) 4 [book.@more.@any.@pl] (after applying rule 05)* *The attribute .@pl is actually redundant in the presence of .@more and may be omitted, but the rule 05 is necessary to make "book.@pl" out of "books" == One-relation entries == g) possessive determiner + noun: "my book" RULE 01 + RULE 06 0 [my][ ][book] (initial state) 1 [my][book] (after applying rule 01) 2 [pos(book;my)] (after applying rule 06) h) determiner + possessive determiner + noun: "my own book" RULE 01 + RULE 02 + RULE 06 0 [my][ ][own][ ][book] (initial state) 1 [my][own][book] (after applying rule 01 twice) 2 [my][book.@own] (after applying rule 02) 3 [pos(book.@own;my)] (after applying rule 06) i) determiner + noun + "of" + possessive pronoun: "a book of mine" RULE 01 + RULE 02 + RULE 07 0 [a][ ][book][ ][of][ ][mine] (initial state) 1 [a][book][of][mine] (after applying rule 01 three times) 2 [book.@indef][of][mine] (after applying rule 02) 3 [pos(book.@own;my)] (after applying rule 07) j) indefinite pronoun + "of" + determiner + noun: "all of the books" RULE 01 + RULE 02 + RULE 05 + RULE 08 0 [all][ ][of][ ][the][ ][books] (initial state) 1 [all][of][the][books] (after applying rule 01 three times) 2 [all][of][books.@def] (after applying rule 02) 3 [all][of][book.@def.@pl] (after applying rule 05) 4 [qua(book.@def.@pl;all)] (after applying rule 08) k) noun + "of" + proper noun: "car of John" RULE 01 + RULE 09 0 [car][ ][of][ ][John] (initial state) 1 [car][of][John] (after applying rule 01 twice) 2 [pos(car;John)] (after applying rule 09) l) proper noun + "'s" + noun: "John's car" RULE 01 + RULE 10 0 [John]['s][ ][car] (initial state) 1 [John]['s][car] (after applying rule 01) 2 [pos(car;John)] (after applying rule 10) m) determiner + noun + preposition + noun: "a book about cars" RULE 01 + RULE 02 + RULE 05 + RULE 11 0 [a][ ][book][ ][about][ ][cars] (initial state) 1 [a][book][about][cars] (after applying rule 01 three times) 2 [book.@def][about][cars] (after applying rule 02) 3 [book.@def][about][car.@pl] (after applying rule 05) 4 [mod(book.@def;car.@pl.@about)] (after applying rule 11) n) specifier adverb (without att in the dictionary) + adjective: "extremely beautiful" RULE 01 + RULE 12 0 [extremely][ ][beautiful] (initial state) 1 [extremely][beautiful] (after applying rule 01) 2 [qua(beautiful;extremely)] (after applying rule 12) o) noun + "and" + noun: "John and Mary" RULE 01 + RULE 13 0 [John][ ][and][ ][Mary] (initial state) 1 [John][and][Mary] (after applying rule 01 twice) 2 [and(Mary;John)] (after applying rule 13) p) noun + "or" + noun: "John or Mary" RULE 01 + RULE 14 0 [John][ ][or][ ][Mary] (initial state) 1 [John][or][Mary] (after applying rule 01 twice) 2 [or(Mary;John)] (after applying rule 14) q) determiner + adjective + noun: "the beautiful car" RULE 01 + RULE 15 + RULE 02 0 [the][ ][beautiful][ ][car] (initial state) 1 [the][beautiful][car] (after applying rule 01 twice) 2 [the][mod(car;beautiful)] (after applying rule 15) 3 [mod(car;beautiful).@def] (after applying rule 02) r) determiner + noun + noun: "the glass mug" RULE 01 + RULE 16 + RULE 02 0 [the][ ][glass][ ][mug] (initial state) 1 [the][glass][mug] (after applying rule 01 twice) 2 [the][mod(mug;glass)] (after applying rule 16) 3 [mod(mug;glass).@def] (after applying rule 02) s) determiner + specifier adverb + adjective + noun: "the most expensive car" RULE 01 + RULE 03 + RULE 15 + RULE 02 0 [the][ ][most][ ][expensive][ ][car] (initial state) 1 [the][most][expensive][car] (after applying rule 01 three times) 2 [the][expensive.@most][car] (after applying rule 03) 3 [the][mod(car;expensive.@most)] (after applying rule 15) 4 [mod(car;expensive.@most).@def) (after applying rule 02) t) determiner + determiner + noun + adjective: "all the books available" RULE 01 + RULE 05 + RULE 02 + RULE 17 0 [all][ ][the][ ][books][ ][available] (initial state) 1 [all][the][books][available] (after applying rule 01 three times) 2 [all][the][book.@pl][available] (after applying rule 05) 3 [all][book.@pl.@def][available] (after applying rule 02 for the first time) 4 [book.@pl.@def.@all][available] (after applying rule 02 for the second time) 5 [mod(book.@pl.@def.@all;available)] (after applying rule 17) u) noun + verb: "he arrives" RULE 01 + RULE 18 0 [he][ ][arrives] (initial state) 1 [he][arrives] (after applying rule 1) 2 [agt(arrives;he)] (after applying rule 18) v) noun + auxiliary verb (with att in the dictionary) + verb: "he will arrive" RULE 01 + RULE 19 + RULE 18 0 [he][ ][will][ ][arrive] (initial state) 1 [he][will][arrive] (after applying rule 1 twice) 2 [he][arrive.@future] (after applying rule 19) 3 [agt(arrive.@future;he)] (after applying rule 18) w) noun + auxiliary verb + negation + verb: "he will not arrive" RULE 01 + RULE 20 + RULE 19 + RULE 18 0 [he][ ][will][ ][not][ ][arrive] (initial state) 1 [he][will][not][arrive] (after applying rule 1 three times) 2 [he][will][arrive.@not] (after applying rule 20) 3 [he][arrive.@not.@future] (after applying rule 19) 4 [agt(arrive.@not.@future;he)] (after applying rule 18) x) noun + "is" + verb in gerund: "he is arriving" RULE 01 + RULE 21 0 [he][ ][is][ ][arriving] (initial state) 1 [he][is][arriving] (after applying rule 1 twice) 2 [he][arrive.@present.@progressive] (after applying rule 21) 3 [agt(arrive.@present.@progressive;he)] (after applying rule 18) y) noun + copula + adjective: "this is beautiful" RULE 01 + RULE 22 0 [this][ ][is][ ][beautiful] (initial state) 1 [this][is][beautiful] (after applying rule 1 twice) 2 [aoj(beautiful;this)] (after applying rule 22) z) noun + verb + reflexive pronoun: "I love myself" RULE 01 + RULE 23 + RULE 18 0 [I][ ][love][ ][myself] (initial state) 1 [I][love][myself] (after applying rule 1 twice) 2 [I][love.@reflexive] (after applying rule 23) 3 [agt(love.@reflexive;I)] (after applying rule 18)