Hi
Can you help me?
programm: ?-start(_P,X,[]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%
sentence(P) --> entity_1(P), entity_2(P).
entity_1(P) --> case_1(P).
case_1(a) --> [noun_a].
case_1(b) --> [noun_b].
entity_2(P) --> case_2(P).
case_2(a) --> [verb_c].
case_2(b) --> [verb_d].
%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can you make Prolog output this grammar
without '-->' but instead with ':-' .
like:
This line :
sentence(P) --> entity_1(P), entity_2(P).
...
is output:
sentence(A,C) :- entity_1(A,B), entity_2(B,C).
...
Can you help me?
programm: ?-start(_P,X,[]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%
sentence(P) --> entity_1(P), entity_2(P).
entity_1(P) --> case_1(P).
case_1(a) --> [noun_a].
case_1(b) --> [noun_b].
entity_2(P) --> case_2(P).
case_2(a) --> [verb_c].
case_2(b) --> [verb_d].
%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can you make Prolog output this grammar
without '-->' but instead with ':-' .
like:
This line :
sentence(P) --> entity_1(P), entity_2(P).
...
is output:
sentence(A,C) :- entity_1(A,B), entity_2(B,C).
...