%Computational Linguistics II, Feb-May 1999 %Joseba Abaitua, Universidad de Deusto %--------------------dcg3.dec------------------------------ %Based on dcg2.dec, we enrich the vocabulary with 2 new entries. %Notice that the rule for subject checks for nominative case. %Try ?-s_bar(S_bar,[]) %or try ?-go, now there are again 4 correct solutions, %only one of which was chosen by Shakespeare. %---------------------------------------------------------- conj(agr(_,_)) --> [if]. pron(agr(sg1,nom)) --> [i]. pron(agr(sg1,acc)) --> [me]. v(agr(sg1,_)) --> [profane]. v(agr(sg3,_)) --> [profanes]. p(agr(_,acc)) --> [with]. det(agr(_,_)) --> [my]. a(agr(_,_)) --> [unworthiest]. n(agr(sg3,_)) --> [hand]. s_bar --> conj(_), s. s --> np(agr(Num,nom)), vp(agr(Num,_)). 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.