I have written set of rules in prolog, if rule matches particular action occurs. something like:
rule_second_question(X, Y, X, W):-
(
LINK_BASE == 'G',
is_verb_form(X),
aggregate_all(X, linkage(W, _, _, _, _, _, _, _, _, 'RS'), Y),
writeln(Y),
Count == 1,
SUBJECT = X,
nb_linkval(rule, 'twol')
)
I could write similar rules in python, c++ also with if
, else
.
My program is about linguistic. I don't understand how prolog can make difference compare to other programming language.
Any help of example would be much appreciable.