:- dynamic synonym/2. % used in the table :- include('synonym-db'). get_synonym(In,Out) :- synonym(In,Out). get_synonym(In,In) :- not(synonym(In,_)).