;; Lexicon and Grammars for  Chapter 7

;;   A lexicon of auxiliary words - Note that all the SUBCAT features have been
;;   deleted, in order to better show the effect of statistical training

(setq *lexicon7*
  '(
    ;;  entries for chapter 7 examples
    (a (art (agr 3s) (root A1)) a1)
    (a (n (root A1) (agr 3s)) a2)
    (ate (v (root EAT1) (agr ?a) (vform past)) ate1)
    (bloom (v (root TO-BLOOM1) (agr 3p) (vform pres)) bloom1)
    (bloom (n (root BLOOM1) (agr 3s)) bloom2)
    (blooms (v (root TO-BLOOM1) (agr 3s) (vform pres)) bloom3)
    (blooms (n (root BLOOM1) (agr 3s)) bloom4)
    (the (art (root THE1) (agr (? a 3s 3p))) the1)
    (flies (n (root FLY1) (agr 3p)) fly1)
    (flies (v (root FLY2) (vform pres) (agr 3s)) fly2)
    (fly (n (root FLY2) (agr 3s)) fly3)
    (fly (v (root FLY2) (vform pres) (agr 3p)) fly4)
    (fruit (n (root FRUIT1) (agr 3s)) fruit1)
    (fruit (v (root TO-FRUIT1) (agr 3p) (vform pres)) fruit2)
    (fruits (n (root FRUIT1) (agr 3p)) fruit3)
    (fruits (v (root TO-FRUIT1) (agr 3s) (vform pres)) fruit4)
    (like (n (root LIKE1) (agr 3s)) like1)
    (like (v (root TO-LIKE1) (vform pres) (agr 3p)) like2)
    (like (p (ptype adv)) like3)
    (likes (n (root LIKES1) (agr 3s)) likes1)
    (likes (v (root TO-LIKE1) (vform pres) (agr 3s)) like4)
    (flower (n (root FLOWER1) (agr 3s)) flower1)
    (flower (v (root TO-FLOWER1) (agr 3p) (vform pres)) flower2)
    (flowers (n (root FLOWER1) (agr 3p)) flower3)
    (flowers (v (root TO-FLOWER1) (agr 3s) (vform pres)) flower4)
    (bird (n (root BIRD1) (agr 3s)) bird1)
    (bird (v (root TO-BIRD) (agr 3p) (vform pres)) bird2)
    (birds (n (root BIRD1) (agr 3p)) bird3)
    (birds (v (root TO-BIRD) (agr 3s) (vform pres)) bird4)
    (house (n (agr 3s)) house1)
    (house (v (agr 3p) (vform pres)) house2)
    (houses (n (agr 3p)) house3)
    (houses (v (agr 3s) (vform pres)) house4)
    (peaches (n (agr 3p) (root PEACH1)) peaches1)
    ;;  *lexicon4-6*
    (be (v (root BE1) (vform bare) (irreg-pres +) (irreg-past +)) be0)
    (cry (v (root CRY1) (vform bare)) cry1)
    (cry (v (root CRY1) (agr 3p) (vform pres)) cry2)
    (dog (n (root DOG1) (agr 3s)) dog1)
    (can (n (root CAN1) (agr 3s)) can2)
    (fish (n (root FISH1) (agr (? a 3s 3p)) (IRREG-PL +)) fish1)
    (happy (adj (root HAPPY1)) happy1)
    (he (pro (root HE1) (AGR 3s)) he1)
    (is (v (root BE1) (VFORM pres) (AGR 3s)) be01)
    (Jack (name (agr 3s) (root JACK1)) jack1)
    (jack (n (agr 3s) (rrot JACK2)) jack2)
    (man (n (root MAN1) (agr 3s)) man1)
    (man (v (root TO-MAN1) (vform pres) (agr 3p)) man3)
    (men (n (root MAN1) (agr 3p)) man2)
    (saw (n (root SAW1) (agr 3s)) saw1)
    (saw (v (root SAW2) (vform bare)) saw2)
    (saw (v (root SEE1) (VFORM past) (agr ?a)) see1)
    (see (v (root SEE1) (VFORM bare) (irreg-past +) (en-pastprt +)) see2)
    (seed (n (root SEED1) (AGR 3s)) seed1)
    (to (to (vform inf)) to1)
    (want (v (root WANT1) (VFORM bare)) want1)
    (was (v (root BE1) (VFORM past) (AGR (? a 1s 3s))) be02)
    (were (v (root BE1) (VFORM past) (AGR (? a 2s 1p 2p 3p))) be03)

    ;; auxiliaries
    (can (aux (modal +) (root CAN1) (vform pres) (agr ?a) (COMPFORM bare)) can1)
    (could (aux (modal +) (root COULD1) (vform (? v pres past)) (agr ?a) (COMPFORM bare)) could1)
    (do (aux (modal +) (root DO1) (vform pres) (agr (? a 1s 2s 1p 2p 3p)) (COMPFORM bare)) do1)
    (does (aux (modal +) (root DO1) (vform pres) (agr 3s) (COMPFORM bare)) does1)
    (did (aux (modal +) (root DO1) (vform past) (agr ?a) (COMPFORM bare)) did1)
    (have (aux (vform bare) (root HAVE-AUX) (COMPFORM pastprt)) have1)
    (have (aux (vform pres) (root HAVE-AUX) (agr (?a 1s 2s 1p 2p 3p)) (COMPFORM pastprt)) have2)
    (has (aux (vform pres) (root HAVE-AUX) (agr 3s) (COMPFORM pastprt)) have3)
    (had (aux (vform past) (root HAVE-AUX) (agr ?a) (COMPFORM pastprt)) have4)
    (having (aux (vform ing) (root HAVE-AUX) (COMPFORM pastprt)) have5)
    (be (aux (root BE-AUX) (VFORM bare) (COMPFORM -)) be1)
    (is (aux (root BE-AUX) (VFORM pres) (COMPFORM -) (AGR 3s)) be2)
    (am (aux (root BE-AUX) (VFORM pres) (COMPFORM -) (AGR 1s)) be3)
    (are (aux (root BE-AUX) (VFORM pres) (COMPFORM -) (AGR (?a 2s 1p 2p 3p))) be4)
    (was (aux (root BE-AUX) (VFORM past) (AGR (? a 1s 3s)) (COMPFORM -)) be5)
    (were (aux (root BE-AUX) (VFORM past) (AGR (? a 2s 1p 2p 3p)) (COMPFORM -)) be6)
    (been (aux (root BE-AUX) (VFORM pastprt) (COMPFORM -)) be7)
    (being (aux (root BE-AUX) (VFORM ing) (COMPFORM -)) be8)
    ;;  verbs
    (put (v (root PUT) (vform bare) (irreg-past +)) put1)
    (put (v (root PUT) (vform past) (agr ?a)) put2)
    ;;  prepositions
    (of (p (pform of) (root OF1)) of1)
    (in (p (ptype loc) (pform in) (root IN1)) in1)
    (on  (p (ptype loc) (pform on) (root ON1)) on1)
    (to  (p (ptype mot) (pform to) (root TO1)) to2)
    (from  (p (ptype mot) (pform from) (root FROM1)) from1)))
    

  
(setq *grammar7-17*
      '((headfeatures
         (s vform agr)
         (vp vform agr)
         (np agr)
         (pp ptype))
        ((s (inv -))
         -7-17-1> 
         (np (agr ?a)) (head (vp (vform (? v pres past)) (agr ?a))))
        ((vp)
         -7-17-2>
         (head (v)))
        ((vp)
         -7-17-3>
         (head (v)) (np))
        ((vp)
         -7-17-4>
         (head (v)) (np) (pp))
        ((np)
         -7-17-5>
         (head (np)) (pp))
        ((np)
         -7-17-6>
         (n) (head (n)))
        ((np)
         -7-17-7>
         (head (n)))
        ((np)
         -7-17-8>
         (art) (head (n)))
        ((pp)
          -7-17-9>
          (head (p)) (np))
        ((np)
          -7-17-10>
          (head (name)))
         ((np)
          -7-17-11>
          (head (pro)))
         ((vp)
          -7-17-12>
          (head (aux)) (vp))
         ((vp)
          -7-17-13>
          (Head (vp)) (pp))
         ((np)
          -7-17-14>
          (art) (n) (head (n)))))


