sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),[over,over], {VP=verb_phrase(verb(N)),number(N)}. noun_phrase(noun_phrase(D,N))-->determiner(D),noun(N). verb_phrase(verb_phrase(V,NP))-->verb(V),noun_phrase(NP). verb_phrase(verb_phrase(V))-->verb(V). determiner(determiner(the))-->[the]. determiner(determiner(an))-->[an]. determiner(determiner(a))-->[a]. noun(noun(apple))-->[apple]. noun(noun(pear))-->[pear]. noun(noun(man))-->[man]. verb(verb(eats))-->[eats]. verb(verb(8))-->[8]. verb(verb(ate))-->[ate]. verb(verb(likes))-->[likes]. /* sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP). sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),['[',done,']']. sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),['.']. sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),['.']. sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),{VP=verb_phrase(verb(N)),number(N)},['.']. sentence(sentence(NP,VP))-->noun_phrase(NP),verb_phrase(VP),{VP=verb_phrase(verb(N)),number(N)},['.']. */