sentence(X) :- X=[cntower,is,a,tower]. sentence(X) :- X=[a,house,is,a,building]. sentence(X) :- X=[a,tower,is,a,structure]. sentence(X) :- X=[a,building,is,a,structure]. %%sentence(X) :- X=[a,follows,b]. %%sentence(X,W) :- X=[a|Y],Y=[follows|Z],Z=[b|W]. %%sentence(X,W) :- =([a|Y],X),=([follows|Z],Y),=([b|W],Z). sentence --> [a],[follows],[b]. xsentence(Q) --> [a],[follows],[b],{Q=great}. xsentence(Q) --> [a],[follows],[c],{Q=good}. xxsentence(Q,P) --> [a],[follows],letter(T),{Q=good,P=T}. letter(T) --> [a],{T=a}. letter(T) --> [b],{T=b}. letter(T) --> [c],{T=c}. factoid(C) --> person(P),[is],property(T),{C=..[T,P]}. person(peter) --> [peter]. person(mary) --> [mary]. person(john) --> [john]. property(tall) --> [tall]. property(smart) --> [smart]. property(smart) --> [clever]. property(smart) --> [intelligent]. %% a Sth1 is a Sth2 to be: sth2(X) :- sth1(X) %% sth1 is a Sth2 to be: sth1(sth2). taxonomy(C) --> article,[Sth1],{not(Sth1=ghost)},[is],article,[Sth2],{H=..[Sth2,X],B=..[Sth1,X],C= :-(H,B)}. taxonomy(C) --> [Sth1],[is],article,niceone(Sth2),{C=..[Sth2,Sth1]}. article --> [a]. article --> [an]. article --> [the]. niceone(person) --> [person]. niceone(car) --> [car]. niceone(car) --> [automobile].