Join predicates in Prolog with different size -
i'm trying write program swi-prolog. have predicate converts english words spanish.
listtran([],[]). listtran([head|tail],[trans|spanish]) :- diccionario(head,trans), listtran(tail,spanish).
and have predicate verifies sentence structure.
sentence(w1,w2,w3) :- word(noun,w1), word(verb,w2), word(adjective,w3).
now want join them in same predicate, ideas?
translatedsentence(w1,w2,w3) :- sentence(v1,v2,v3), listtran([v1,v2,v3], [w1,w2,w3]).
Comments
Post a Comment