I want to define a Lisp function called LOLO which will be able to return the head of a syntagm. The head of s syntagm is defined as follow:
Constituent
P (The head is V, the verb)
SN (The head is N, a noun, or Nproper (proper noun)
SV (The head is V, a verb)
The LOLO defined function must give these answers when put in the listener :
(LOLO ‘(SN (Nproper Milou) > Milou
(LOLO ‘(SN (Det the) N mouse))) > Mouse
(LOLO ‘(SN (Det this) (N dog) (Adj lazzy))) > dog
(LOLO ‘(SV (V eats) (SN (Det the) (N mouse)) (SP (Prep on) (SN
(Det the) (N carpet))) > eats
(LOLO ‘(P (SN (Nproper Minou)) (SV ( mange) (SN (Det the) (N
mouse)) (SP (Prep on) (SN (Det the) (N carpet)))))) >
eats
Thanks!
Lilas
