/************************************************************************* name: firstAttempt.pl version: July 2002 description: Semantics Construction using DCGs authors: Stephan Walter, Aljoscha Burchardt *************************************************************************/ :- use_module(comsemLib,[compose/3]). :- [comsemOperators]. /*======================================================================== DCG with additional arguments ========================================================================*/ s(NPSem+VPSem) --> np(NPSem), vp(VPSem). np(X) --> pn(X). np(DetSem+NSem) --> det(DetSem),n(NSem). vp(X) --> iv(X). vp(VSem+NPSem) --> tv(VSem),np(NPSem). /*======================================================================== Lexical Entries ========================================================================*/ det(exists(_,_&_)) --> [a]. pn(john)--> [john]. pn(mary)--> [mary]. n(man(_)) --> [man]. n(woman(_)) --> [woman]. iv(talk(_))--> [talks]. iv(walk(_))--> [walks]. tv(love(_,_))--> [loves]. /*======================================================================== Postprocessing ========================================================================*/ insertArgs(N+V,V) :- compose(V,_,[N]). insertArgs(N+(V+O),V) :- compose(V,_,[N,O]).