resultList(UsersQuery):-
question(X,H),
write(H),
myintersection(H,UsersQuery,Match,TotalQuestionKeywords),
Percent is Match/TotalQuestionKeywords*100,
write('Question: '),
write(X),nl,write('Quality: '), write(Percent),write('%'),nl,
/* please look at this part
Percent>=50,
assert(listofQuestions(Percent,Question)),
write(Percent),write(Question),nl,
fail.
resultList(_).
我想填充名为“listofQuestions”事实数据库。 一切工作正常,但东西,我主张在记忆停留。 所以,如果我再次运行我的程序,我得到同样的一堆添加到“listofQuestions”的事实。
我只希望有一组数据。
谢谢