I am trying to make a DCG in prolog so that I create a sentence based on some predicates. I have two pieces of information = properties of objects ("Charles is a man.") and relations between objects ("Charles is the father of William.")
The task is to create sentences like this
[charles,is,a,man]
[camilla,is,a,woman]
[camilla,is,the,wife,of,charles]
[charles,is,the,father,of,william]
[charles,is,the,husband,of,camilla]
I can create a simple DCG which can generate sentences but how I can implement the relations so that the subject(charles, camilla, charles) correspond to the predicate part (is a man, is a woman)?