%Computational Linguistics II, Feb-May 1999 %Joseba Abaitua, Universidad de Deusto %-------------------dcg2.dec------------------------------- %This a yet more constraining definite clause grammar. %It uses agreement features to prevent undesired results %Try ?-s_bar(S_bar,[]) %or try ?-go, there is only ONE solution %---------------------------------------------------------- conj(agr(_,_)) --> [if]. pron(agr(sg1,nom)) --> [i]. v(agr(sg1,_)) --> [profane]. p(agr(_,acc)) --> [with]. det(agr(_,_)) --> [my]. a(agr(_,_)) --> [unworthiest]. n(agr(sg3,_)) --> [hand]. s_bar --> conj(_), s. s --> np(Agr), vp(Agr). vp(Agr) --> v(Agr), pp(_). pp(Agr) --> p(Agr), np(Agr). np(Agr) --> pron(Agr). np(Agr) --> det(_), a(_), n(Agr). %---------------------------------------------------------- go :- s_bar(S_bar,[]), write(S_bar), nl, fail.