EXPLANATORY TEXT PLANNING IN LOGIC BASED SYSTEMS 
CLARISSE SIECKENIUS DE SOUZA 1 
PUC-Rio, Rio de Janeiro, Brazil 
MARIA DAS GRA(~AS VOLPE NUNES 
ICMSC-USP, S~o Carlos, Brazil 
Abstract 
This paper discusses aspects of the 
planning of explanatory texts for logic 
based systems. It presents a method for 
deriving Natural Language text plans from 
Natural Deduction-based structures. This 
approach allows for the planning of 
explanatory texts in a general-purpose 
logic based system framework, ensuring a 
greater degree of portability across 
domains. 
1. Introduction 
Full exploration of resources 
offered by knowledge-based 
systems (KBS's) is only possible if 
their interface is able to convey a 
comprehensible image of the 
system's reasoning. Given the 
abstract and complex nature of 
such reasoning, natural language 
(NL) text is an intuitive means 
interface designers choose to 
convey the system's responses. 
The same line of thought is 
applicable to the input side of the 
interface system -- NL seems to be 
intuitively desirable to convey KBS 
users' questions. Consequently, 
the particular framework we 
envisage here for human- 
computer interaction is one in 
which a NL interpreter converts 
users' utterances into a 
representation language and a NL 
generator converts the system's 
reasoning represented in this 
language into NL text. 
Logic-based knowledge 
representation techniques have 
the advantage of being associated 
to a formal language, whose 
syntax and semantics is precisely 
defined and which ensures 
portability across domains. Unlike 
what often happens with other 
representation techniques, such 
as associative networks, in this 
case general methods can be 
conceived to translate any valid 
sentence of the formal language 
into one or more valid sentences 
in another language, including 
natural language. 
Our choice of a ND inference 
system \[8\] is not arbitrary. Previous 
research \[1\] has shown that ND 
renders more understandable 
proofs than the algorithmically 
more efficient resolution based 
systems, for instance. The output 
of a ND-based automatic prover is 
a recursively generated tree, 
whose branches are qualified by 
possibly different inference rules. 
The limited number of rule types, 
together with explicit principles to 
combine them, allows for the 
identification of proof patterns. 
Therefore, the input to the text 
generator of the interface system 
presents a tow degree of 
variability, thus favoring the use of 
the schemata approach to text 
planning. For each pattern of proof 
there is a corresponding pattern of 
text. 
Moreover, as we will see, given 
that ND proofs are more 
understandable, only a few 
structural operations on the proof 
trees are needed to account for the 
content selection step during the 
NL text planning process. 
ACTES DE COLING-92, NAIVI'ES, 23-28 AOt~l' 1992 7 4 2 PROC. OF COLING-92, NANTES, AUG. 23-28, 1992 
2. Deriving Text Plans from 
Natural Deduction Proof 
Trees 
In order to achieve the generation 
of coherent and cohesive 
multisentential NL texts, our 
processor performs two major 
steps: planning and realization. 
This separation is common to 
other approaches \[4,5\], and is 
meant to manage tasks involved in 
deciding what to say at a different 
step than those involved in 
deciding how to say it. 
In terms of text planning 
paradigms, specifically, choices 
refer to either a rhetorical grammar 
based approach -- which consists 
Our approach differs from those of 
McKeown and Paris's \[7\] or Moore 
and Swartout's \[5\], for example, 
because we use a theorem prover. 
It generates an idefinite number 
and variety of schemata (proof 
trees) instead of a limited set of 
schemata known to the designer. 
This feature forces us to conceive 
of transformational rules that will 
operate systematically on our 
schemata in order to turn them into 
acceptable NL text plans. 
Additionally, although we generate 
text plans dynamically by means of 
structural rules, our approach is 
also different from other RST- 
based approaches such as those 
suggested by Scott and Souza \[9\], 
I\[A\] A --~ B 
B ~B re 
..L 
-i b) -A 
A -'--I~ B ~B 
mt 
~A 
(a) (b) 
Figure I: Deriving Modus Tollens 
essentially of planning text in a 
dynamic manner by using overall 
rhetorical structure rules combined 
with perlocutionary goals and 
users' beliefs, as provided by 
Rhetorical Structure Theory (RST) 
\[3\] -- or a schemata based 
approach -- which amounts to 
selecting among alternative pre- 
existing text structuring schemata, 
which are elaborated from ideal or 
typical NL texts actually written for 
the purposes at 'hand \[4,7\]. We 
have chosen the schemata 
approach, although elements of 
rhetorical structure rules are 
present and accessible to the 
system's reasoning. 
for example, because the 
elements included in the 
specification of RST relations are 
not computed bv the system to 
constrain the application of 
transformational rules. They are 
used by the designer of the system 
to map certain patterns found in 
the proof trees to certain rhetorical 
structures. So, it is not the case 
that the system fully controls the 
selection of rhetorical relations, but 
it can, nevertheless, have access 
to the reasons why the designer 
has selected them -- it suffices to 
interpret the specification of the 
pre-selected relations appearing 
in the derived schemata for a 
given proof. 
ACRES DE COL1NG-92, NAbrI~:S, 23-28 Ao~I' 1992 7 4 3 PROC. O1: COLING-92, NANTES, AUG. 23-28, 1992 
2.1 Manipulating the Proof 
Tree 
The content selection step in our 
approach consists of two 
operations performed on proof 
patterns: f~¢toriz0ti0n and 
derivation of rules. Both operations 
prune the proof tree. Factorization 
applies to a sequence of inference 
rules involving the introduction or 
elimination of identical logical 
connectives. The motivation for the 
factorization is only to avoid that 
derived text plans reflect in NL 
expositions of the system's 
reasoning a structure which is due 
to a syntactic idiosyncrasy of a 
logical language. So, for each 
logical connective (->, -, v, &), a 
which cover the whole set of 
derived rules \[6\], including 
tautologies, De Morgan laws and 
syllogisms. 
2.2. From Proof Trees to Text 
Plans 
The rhetorical structuring step is 
carried out by means of mapping 
rules from ND subtrees to RST 
schemata. RST presents some 
kernel concepts we should 
emphasize here. First, it proposes 
that rhetorical relations bind two 
hierarchically different units: nuclei 
and satellites. Nuclei carry the 
most important portion of 
information to be conveyed in the 
text span, whereas satellites carry 
~1 ~t2 
A ~A 
2- 
consequence 
J ". 
opposition ..,L (absurdity) 
nl n2 (A) (-A) 
(a) (b) 
Figure II: An Example of a Mapping Rule 
factorization is proposed to reduce 
the impact of the language 
representation syntax on the final 
text. 
Derivation rules affect content 
selection by detecting logic 
argumentation patterns usually 
found in common sense 
reasoning. Such patterns, 
however, do not belong to the set 
of inference rules of a ND system, 
but fit naturally in the reasoning 
path. An instance of such 
derivation rules is Modus Toflens. 
In Figure I (a), we see the 
canonical ND derivation of ~A from 
A->B and -B. Rule (b) is derived 
from pattern (a) in a systematic 
way. In fact, we have formally 
defined abstract proof patterns 
relatively secondary information. 
The attribution of importance to 
informational content is made by 
the writer. Second, rhetorical 
relations are specified in terms of 
writer's intentions and reader's 
expected reactions. 
A ND subtree corresponding to an 
inference rule application is 
mapped onto RST subtrees. The 
example in Figure II shows the 
mapping rule for the absurdity rule, 
where x denotes a derivation path. 
Notice that, whereas ND subtrees 
have premises as leaves and a 
conclusion as the root, RST 
subtrees have information (ie. 
premises and conclusion) as 
leaves, and rhetorical relations as 
nodes. The mapping rules are 
AcrEs DE COLING-92, NANTES, 23-28 ^ot'rr 1992 7 4 4 PROC. OF COLING-92, NANTES, AUG. 23-28, 1992 
guided by the type of the inference 
rule applied. In our approach, 
nuclei are always the information 
corresponding to premises of 
inference rules, and satellites, the 
conclusions. For the purpose of 
exposing the system's reasoning, 
the information about facts and 
axioms that have caused the 
conclusion is more central than the 
conclusion itself. It is worth saying 
that intermediary conclusions in 
the proof tree have, in each step, 
the role of premises, due to the 
recursiveness of the structure. 
Mapping inference rules onto RST 
structures results in a text plan 
which, if realized, is still far from 
acceptable. This is due to the 
a special mode. In particular, this 
is the case of hypothesis 
assumptions in ND-based 
systems, whose appropriate 
structuring in rhetorical terms is 
context-sensitive. Once 
hypotheses are raised, ND proof 
proceeds according to the same 
set of rules as in any other case. 
Later on, when desired (partial) 
conclusions are achieved, those 
hypotheses are discarded. Of 
course, discarding only makes 
sense if raising is in topic. So, the 
text plan has to explicitly introduce 
the status of discardable premises 
as hypotheses, so that when 
discarding is mapped onto a 
rhetorical schema, the reader can 
refer it to the hypothesized 
sequence 
purpose (schema ~ 
(schema l~ ) conclude ( ~ ) 
Figure II1: Antecipation of Reasoning Path 
method of building text plans in a 
recursive fashion: in traversing the 
proof tree, inference rules are 
locally translated into rhetorical 
relation schemata. Also, if 
realization took place in an 
interleaved way \[2\], the resulting 
text plan could be sufficient for 
acceptable text rendition. 
However, since a sequential 
model is assumed, enhancements 
to this initial version of the text plan 
have to be made. 
Since text planning is the result of 
recursive context-free rule 
application, some important 
structures that improve the 
understandability of the final 
textual exposition of the system's 
reasoning have to be dealt with in 
information in topic. This is done 
through the use of a Condition 
relation at the top of the rhetorical 
structured schema. 
In fact, cases as the above- 
mentioned are related to discourse 
structuring not at the level of 
informational content (ie. proof+ 
bound) proper, but rather at the 
level of the writer's perlocutionary 
goals, such as clarity, 
understandability and the like. 
Clearly, proof-derived mapping 
rules account for informational 
content, but cannot fully ensure the 
achievement of perlocutionary 
goals in writing. This is why, in 
situations like assumption and 
ordering of hypotheses, for 
example, special mechanisms are 
AcrEs DL: COLING-92. NANTES, 23-28 nOt)T 1992 7 4 $ P OC. Or COLING+92, NANII~S, AUG. 23-28, 1992 
introduced. Another similar case is 
that of repeating (ie. re-introducing 
as topic) information 
corresponding to premises 
logically related to a conclusive 
information, but linearly far from 
the point where that information is 
presented. The necessity of this 
kind of rL.e_C_~ll may be derived 
heuristically from the height of the 
corresponding proof tree. 
A relevant point that has to be 
considered in planning long and 
deductive texts is guiding the 
reader along the reasoning path. 
An interesting result of previous 
research \[6\] is that ND normal 
proof patterns offer the possibility 
b_y__c_&~. Proof by case is used 
when the premise available to the 
prover is a disjunction, and the 
proof consists of deriving the 
conclusion from each of the 
elements of the disjunction, 
considered separately. We show, 
in Figure V, the equivalent RST 
structure corresponding to the text 
plan in Figure IV. 
In the following, we propose a 
possible realization of the plan in 
English, where the formulae 
indexed by capital letters are 
instantiated as NL sentences. 
Once again, it is worth noting that 
at the present moment we are 
investigating realization rules and 
-X -X "~ (AvBvC) 
(AvBvC) 
\[A\] A -J~ D \[B\]B ~ E 
D D --),- T E E--I~ 
T T 
\[C\] C ~ F 
T F F --I~ T 
T 
T 
Figure IV: Proof by Case 
of identifying a special type of 
information (minimal formulae) 
which is uniquely related to both 
premises and conclusions. This 
information is then used in text 
planning to anticipate reasoning 
steps. The rhetorical schema 
which applies to this information 
operates at some sort of meta- 
level if compared to other RST 
schemata. See the example in 
Figure III, where \[5 has the role of 
guiding the deduction of o~. 
The result of the planning 
approach exposed here can be 
seen in the example below. First, 
the ND proof in Figure IV presents 
an instance of what is called rEr.g_~f 
processes for B r a z i I i8 n 
Portuguese. Therefore, all 
examples are tentative in English. 
X: There are environment-protection 
policies available. 
A: Ozone is being depleted from the 
atmosphere. 
B: Land is undergoing a desertification 
process. 
C: Waste is accumulating on earth. 
D: Human immune system is depressed. 
E: The area of productive land on earth is 
getting smaller. 
F. Toxic substances are accumulating on 
earth. 
ACRES DE COLING-92, NANTES, 23-28 AOt3T 1992 7 4 6 PROC. OF COLING-92, NANTES, AUG. 23-28. 1992 
7~" Human life is threatened. 
There aren't any environment protection 
policies available, and this implies that 
either ozone is being depleted from the 
atmosphere, land is undergoing a 
desertification process, or waste is 
accumulating on earth. Suppose that 
there is ozone depletion if+ the 
atmosphere; if so, the human immune 
system is depressed. Therefore, human 
life is threatened. Now, suppose that land 
undergoes desertification; ff so, the area 
of productive land on earth is getting 
smaller. Consequently, human life is also 
have explored the benefits of 
rhetorical structuring as an 
intermediary representation of 
message content, in which the 
kinds of rhetorical relations, their 
specification in syntactic, semantic 
and pragmatic terms \[9\], and the 
reasons why they have been 
selected to appear in the text 
structure are available for the 
generator at the realization step. 
This feature, together with the 
summary /.\ 
elaboration consequence /',,, /',,.,. 
consequence list .+X T 
/",. /\ I list AvBvC conseq, conseq, conseq. 
/X /\ /\/x, 
-X -X->AvBvC list \] list T list T ,,,,',,,/,,,/%, 
cond. D->T cond. L+>T cond. F->T /,,,, /,,,, /\ 
conseq. A conseq. B conseq. C /'.., /\ /",,, 
list D list E list F /N ,/% /x 
A A->D B B->E C C->F 
FigureV: Equivalent RSI Structure 
threatened. Finally, suppose that waste 
accumulates on earth; if so, toxic 
substances also accumulate. Thus, again, 
human life is threatened. In other words, 
since there are no environment protection 
policies available, human life is threatened. 
3. Conclusion 
In the present paper, we have 
approached text planning for the 
generation of explanatory NL 
answers in logic based question- 
answering systems. Assuming a 
two step generation paradigm, we 
soundness and portability 
provided by a logic based 
knowledge representation 
technique, supports the generation 
of better NL explanations of the 
question-answering system's 
reasoning. In terms of the planning 
activity, the rhetorical relations 
and the rhetorical schemata 
derived from proofs provide 
elements for the explicit marking of 
the final text's coherence. 
AcrEs DE COLING-92, NAIffIES, 23-28 no(rr 1992 7 4 7 l)aoc. OF COLING-92, NAI, rrEs, AU6.23°28, 1992 
Moreover, with a rich 
representation of proofs, 
algorithms can be designed to 
manipulate the existing 
hierarchical structure, so that 
cohesion can be guaranteed by 
binding the pieces of information 
with discourse markers like "this", 
"also", "so", and others, which all 
refer to information previously 
mentioned in the text and avoid 
possible misunderstandings due 
to the repetition of mentioned 
elements being interpreted as the 
introduction of new information. 
At the present moment, we are 
investigating general grammatical 
structures to realize the text plan 
and are not devoting much effort to 
customization of output to users 
needs, However, hierarchical 
structures and belief/intention 
oriented specifications of RST 
relations should allow for further 
stylistic elaboration of text. In this 
way, users should be provided 
with an exposition of reasoning 
more adapted to their personal 
knowledge. A specification of a 
text planner following suggestions 
presented in \[6\] is in progress. 
Future work in the short term 
should investigate aspects of the 
specification of the realization 
component. 
4. References 
\[1\] Haeusler, E.H. Automatic Theorem 
Proving: An Attempt to Improve 
Readability of proofs Generated by 
Resolution. In Contemporary 
Mathematics No. 69, pp. 179-188 
1988. 
\[2\] Hovy, E.H. Two types of Planning in 
Language Generation. In Proceedings 
of the 26th. Meeting of the Association 
for Computational Linguistics Buffalo, 
NY. 1988. 
\[3\] Mann, W.C. and Thompson, SA. 
Rhetorical Structure Theory: 
Descnption and Construction of Text 
Structures. Technical Report ISI/RS-86- 
174. Information Sciences Institute. 
University of Southern California. 1987. 
\[4\] McKeown, K.R. Text Generation: 
Using Discourse Strategies and Focus 
Constraints to Generate Natural 
Language Text. Cambridge. Cambridge 
University Press. 1985. 
\[5\] Moore, J.D. and Swartout, W.R. A 
Reactive Approach to Explanation: 
Taking the User's Feedback into 
Account. In Paris, C.L.; Swartout, W.R. 
and Mann, W.C. (eds) Artificial 
Intelligence and Computational 
Linguistics. Kluwer Academic 
Publishers. 1991. 
\[6\] Nunes, M.G.V. A Gera~&o de 
Respostas Cooperativas em Sistemas 
Baseados em L6gica. PhD Dissertation. 
Departamento de Informfitica. PUC-Rio, 
Rio de Janeiro. 1991. 
\[7\] Paris, C.L. and McKeown, K.R. 
Discourse Strategies for Describing 
Complex Physical Objects. In Kempen, 
G. (ed) Natural Language Generation. 
Dordrecht. Martinus Nijhoff Publishers. 
1987. 
\[8\] Prawitz, D. Natural Deduction. 
Stockholm. 1965. 
\[9\] Scott, D.R. and Souza, C.S. Getting 
the Message Across in RST-based Text 
Generation. In Dale, Mellish and Zock 
(eds) Current Research in Natural 
Language Generation. London. 
Academic Press. 1990. 
1This author is supported by the Brazilian Secretariat of Science and Technology (SCT) 
and by the Brazilian Council for the Development of Science and Technology 
(CNPq). 
AcrEs DE COLING-92. NANTES, 23-28 AOtJT 1992 7 4 8 PROC. or COLING-92, NANTES, AUG. 23-28, 1992 
