Annotation using the description property¶
For rules, it is also possible to add a manual paraphrase to the rule label by making use of the ’description’ property. For example, we can add a manual paraphrase to the rule Ancestor_Rec as follows:
@!{AncestorRule_Rec [
description -> "A person's parent's ancestor is the person's ancestor"^^\string ] }
?Person [ancestor -> ?Ancestor ] :-
?Person [parent -> ?Parent],
?Parent [ancestor -> ?Ancestor].
Now execute the query ’Who are Louisas ancestors?’. Click the question mark next to the returned result Aaron to display its explanation tree. Then click to highlight the top branch Louisa [ancestor -> Aaron] of the explanation tree. Select Show Manual Paraphrase from the right-click menu, as shown in Fig. 301.
A window pops up showing the manual paraphrase of the rule as described by the rule’s description property, as shown in Fig. 302.
For a rule which has no description property, the Show Manual Paraphrase pop-up window will say there is no manual paraphrase available for the rule. For example, the rule ParentRule in family.flr has no description property.
@!{ParentRule}
?Person [parent -> ?Parent] :-
?Parent [child -> ?Person].
If we drill down on Louisa [ancestor -> Aaron] in the explanation tree, we will see ParentRule used in establishing the sub-branch Louisa [parent -> Greg]. Do Show Manual Paraphrase on this rule will pop up a window saying there is no manual paraphrase for the rule available, as shown in Fig. 303.