0% found this document useful (0 votes)
83 views8 pages

An Expert System For The Composition of Formal Spanish Poetry - Pablo Gervás

Uploaded by

Azael Contreras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views8 pages

An Expert System For The Composition of Formal Spanish Poetry - Pablo Gervás

Uploaded by

Azael Contreras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Knowledge-Based Systems 14 (2001) 181±188

www.elsevier.com/locate/knosys

An expert system for the composition of formal Spanish poetry


Pablo GervaÂs*
Departamento de Sistemas InformaÂticos y ProgramacioÂn, Universidad Complutense de Madrid, Edi®cio de la Facultad de MatemaÂticas,
Avenida Complutense s/n, 28040 Madrid, Spain
Accepted 2 February 2001

Abstract
The present paper presents an application that composes formal poetry in Spanish in a semiautomatic interactive fashion. Automatic
Spanish Poetry Expert and Rewriting Application (ASPERA) is a forward reasoning rule-based system that obtains from the user basic style
parameters and an intended message; applies a knowledge-based pre-processor to select the most appropriate metric structure for the user's
wishes; and, by intelligent adaptation of selected examples from a corpus of verses, carries out a prose-to-poetry translation of the given
message. In the composition process, ASPERA combines natural language generation and CBR techniques to apply a set of construction
heuristics obtained from formal literature on Spanish poetry. If the user validates the poem draft presented by the system, the resulting verses
are analysed and incorporated into the system data ®les. q 2001 Elsevier Science B.V. All rights reserved.
Keywords: Natural language generation; Case based reasoning; Rule-based systems

1. Introduction database of information (using NLP techniques to extract all


the required linguistic information from the validated poem).
The automatic generation of text is a well established and ASPERA is designed to be used as a teaching aid for speci®c
promising problem in AI, with numerous practical applica- information technology subjects of the degree on Translation
tions waiting in the sidelines for ef®cient and acceptable and Interpretation at the Universidad Europea Ð CEES.
solutions. Existing systems have shown reasonable results
in restricted domains [3,7,9], opening the way to consider-
ing how more elaborate texts Ð from the point of view of 2. Problem description
aesthetics and reader satisfaction Ð can be obtained [2,4,8].
The composition of poetry ranks among the most challen- On ®rst acquaintance, the generation of poetry involves
ging problems of language generation, and is, therefore, a advanced linguistics skills and common sense, two of the
good test-bed for techniques designed to improve the quality major challenges that face AI in general. On the positive
of generated texts. Automatic Spanish Poetry Expert and side, poetry has the advantage of not requiring exaggerate
Rewriting Application (ASPERA) is a prose-to-poetry precision. To a certain extent, imposing restrictions over the
semiautomatic translator. By ingenious use of well accepted form of a poem implies a slight relaxation on the speci®ca-
AI techniques (Natural Language Processing, Case Based tion of the content. Under this assumption, the general
Reasoning (CBR), Knowledge Based (KB) Systems), the problem becomes tractable. There are three main challenges
application obtains from the user a prose description of the to be faced:
intended message and a rough speci®cation of the type of
poem required (length, mood, topic); selects appropriate 1. a speci®cation of the formal requirements that de®ne a
metre and stanza (by resorting to a knowledge base on literary correct poem under classical literary rules (in a format
style); generates a draft of the poem (by applying CBR tech- that can be used to drive the construction process);
niques to a database of previous poems); requests modi®cation 2. appropriate management of an extensive vocabulary (the
or validation of the draft by the user; and updates its own choice of words plays an important role in determining
the quality of a poem);
3. correct combination of words in the poem to match
* Tel.: 134-91-394-4293; fax: 134-91-394-46-62. both the intended message and the chosen metric
E-mail address: [email protected] (P. GervaÂs). structure.
0950-7051/01/$ - see front matter q 2001 Elsevier Science B.V. All rights reserved.
PII: S 0950-705 1(01)00095-8
182 P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188

2.1. The formal rules of Spanish poetry for the simplest possible stanza with enough complexity to
be distinguishable from prose (the simpli®cation employed
The fact that the application was to be developed in Spanish with respect to syntax/semantics makes it dif®cult for
presents important advantages over other languages. The shorter poems to sound acceptable).
phonetics of Spanish is quite straightforward to obtain Type 3 presents a simple structure that recurs throughout the
from the written word. Most letters in Spanish sound the poem, but with the rhyme changing slowly as it moves down.
same wherever they appear in a piece of text [11], so the A constructive implementation of these rules was devel-
metrics, or the syllabic division, of a verse can be worked oped for the WASP system [4]. WASP was a forward
out algorithmically [6]. Spanish scholars have a love for reasoning rule-based system that used a set of construction
rules, and there is a good set of formal rules [10] describing heuristics obtained from these constraints to produce a poem
the conditions that a poem must ful®l in order to be accep- from a set of words and a set of line patterns provided by the
table. user. The system followed a generate and test method by
The challenge becomes a simple problem of transforming randomly producing word sequences that met the formal
the given evaluation rules (designed to be applied to an requirements. Output results were impeccable from the
existing poem in order to ascertain its acceptability) into point of view of formal metrics, but they were clumsy from
the corresponding construction rules. a linguistic point of view and made little sense. An improved
Given that words are divided into syllables and each word version of the construction strategies developed in WASP is
has a unique syllable that carries the prosodic stress, the the starting point of the generating module of ASPERA.
constraints that the rules have to account for are the following:
2.2. Guiding word choice
1. Speci®c strophic forms require different number of
syllables to a line. The set of words available as building blocks for the
2. Syllables may be run together under speci®c conditions Ð composition process plays a crucial role in determining
this is a form of poetic license called synaloepha Ð thereby the quality of the results. Too narrow a choice of vocabulary
shortening the syllable count of the line involved. can lead to formal requirements not being met. Too wide a
3. The position of the stressed syllable of the last word of a line choice can seriously reduce the ef®ciency of the system,
affects the metric count for that line (adding or subtracting leading to lengthy searches over vast amounts of words. A
one syllable to the count). trade-off must be found: enough words to compose the poem
4. Not all possible stress patterns for a line are valid (depend- must be available, but they must all be words with a reason-
ing on the length). able chance of ®nding their way into the ®nal result. This is a
5. The rhyme of a word is made up of the last half of its part of the problem where intelligent solutions have a good
stressed syllable and all following syllables to the end of chance of outperforming purely computational techniques.
the word, and each strophic form requires a different The ASPID system [5] provided speci®c algorithms for the
rhyming pattern. selection of a working set of words from an initial vocabulary
using methods based on similarity calculations between the
A poem may be an unstructured sequence of lines, but for message proposed by the user for his poem and a corpus of
the purpose of this application only poems of regular strophic already validated verses. Based on the similarity calculations,
forms are considered. For the purposes of the present applica- the system established a set of priorities over the complete
tion, the following strophic forms are relevant: available vocabulary. The next word to be added to the
poem draft was initially looked for only among words marked
with the highest priority, with the search extending in subse-
1. romances, a stanza of several lines of eight syllables where
quent steps to words of lower priority only if none had been
all even numbered lines rhyme together;
found in the previous step. This procedure improved search
2. cuartetos, a stanza of four lines of 11 syllables where the
times considerably and it made possible computations with
two outer lines rhyme together and the two inner lines
wider vocabulary coverage and narrower constraints on
rhyme together;
strophic forms. However, above a certain threshold (of voca-
3. tercetos encadenados, a longer poem made up of stanzas of
bulary size and/or number of constraints imposed on the poem)
three lines of 11 syllables linked together by their rhyme in a
even the method of establishing a priority ordering on the
simple chain pattern ABA BCB CDC¼
available words failed to ensure successful termination. The
ASPID method of priority assignment is retained in ASPERA,
These three types have been chosen because each shows a
but a prior step of knowledge-based pre-selection of the
different structural characteristic.
vocabulary based on user requirements has been added.
Type 1 presents a recurring rhyme that ¯ows all along the
poem. It uses only one rhyme, so many words that rhyme 2.3. Fitting words to message and metric structure
together are required for an acceptable result (our starting
data have proven to be poor choices in this respect). There are several restrictions on the actual process of
Type 2 presents a very simple but rigid structure. It stands composition that must be observed.
P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188 183

Fig. 1. Basic structure of the ASPERA system.

The length of a poem is given by the number of lines (and possible word of the line. The tag is actually a string that
the length of the lines) in the chosen strophic form. The represents information about part of speech, number, and
intended message must be shortened or extended to adjust gender of the word that would stand in that particular place
it to the length of the poem. in the pattern. Patterns act as seed for lines, therefore a
The basic unit for poem composition is not the sentence pattern determines the number of words in a line, the parti-
but the line. A poem may contain one or several sentences, cular fragment of sentence that makes up the line, and the
but it is on its subdivision into lines that the constraints set of words that can be considered as candidates for the
(position of stressed syllables, and rhyme) are imposed. A line. By following this heuristic shortcut, the system is able
step of planning is required to distribute the contents of the to generate verses with no knowledge about grammar or
intended message over the required number of lines. meaning.
Words at the end of lines may have additional constraints
imposed on them (rhyme) by the chosen strophic form.
These restrictions must be taken into account when planning 3. ASPERA: Automatic Spanish Poetry Expert Ð a
the poem. Rewriting Application
The words in a poem must be combined according to the
syntax of the language in question, and must make sense ASPERA is a forward reasoning rule-based system that
according to their semantics. There are two alternative ways performs the following sequence of operations:
of achieving this: to provide the system with adequately rich
lexicon, syntax and semantics for the language involved (as 1. interacts with the user to obtain a speci®cation of the
done in [8] for English poetry), or to develop engineering desired poem (intended message, mood, setting);
solutions that achieve equivalent results without attempting 2. searches its knowledge base to ®nd the most appropriate
to model the imposing complexity of the human language strophic form to match that speci®cation;
faculty. The former solution requires powerful tools capable 3. plans a poem draft by distributing the intended message
of representing and manipulating the syntax and semantics over the chosen strophic form;
of language. For the present application, the latter approach 4. pre-selects and loads a task-speci®c vocabulary and
is preferred. corpus of verse examples for each fragment of the
ASPERA resorts to a radical simpli®cation of the linguis- poem by adequately combining its data ®les (CBR
tic skills underlying poem composition. The exhaustive Retrieve step I);
knowledge approach is abandoned in favour of a heuristic 5. generates each of the lines of the poem draft by mirroring
engineering solution. Only the barest outline of a gramma- the POS structure of one (CBR Retrieve step II) of the
tical outline is provided (in the form of a line pattern) to pre-selected line examples combined with the words in
ensure syntactic correctness. Semantic correctness is not the pre-selected vocabulary (CBR Reuse step);
enforced strictly, rather an approximate result is obtained 6. presents the draft to be validated or corrected by the user
by intelligent pre-selection of the choice of words together (CBR Revise step);
with a memory based approach to word combination. 7. carries out a linguistic analysis of any validated poems in
The system is provided with a corpus of already validated order to add the corresponding information to its data
verses. A CBR approach [1] is applied to this corpus in order ®les to be used in subsequent computations (CBR Retain
to generate new verses. The words in these verses are step).
marked with their corresponding part-of-speech (POS) tag.
A line pattern is generated from these POS tags. Each line The overall structure of the ASPERA system is presented
pattern is a set of tags, and each tag acts as place keeper for a in Fig. 1. Steps 1 and 2 are carried out by the KB system.
184 P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188

Fig. 2. Verse generation using CBR ( p indicates products and operations affecting the whole poem).

Step 3 is performed by the Planning system. Step 4 to 7 are only some of the lines).
the responsibility of the CBR system. A more detailed view ² Degree of formality. Certain strophic forms are more
of the operation of the CBR system is given in Fig. 2. formal than others. This distinction plays an important
ASPERA is written in CLIPS, a rule-based system shell role in selecting the appropriate form.
developed by NASA. Earlier implementations were ² Setting. The system provides a choice between an urban
attempted using Prolog, but the nature of the line generation setting or a rural setting. This is a very restricted choice,
part of the problem, being a constructive combination of a but it may be extended at later stages.
set of elementary ingredients towards the achievement of a ² Mood. As a ®rst approximation, mood is interpreted
single whole which is the ®nal poem, lends itself more either as positive or negative.
easily to a forward-reasoning mode of operation. The
system's poetry expert knowledge base had originally Length of poem and degree of formality are used
been coded in Prolog, but translation onto the new paradigm specially to determine the strophic form. Setting and
presented no special problems. mood are used to select the correct vocabulary.
Once the basic parameters have been set, the user is asked
3.1. Collection of poem speci®cations to provide a prose paraphrase of the intended message. This
paraphrase need not be grammatically sound, and may range
The system interacts with the user to obtain speci®cations from a full explicit text to a set of keywords that the user
of the desired poem. The user is ®rst asked a set of questions would like to show up in the poem. The intended message is
designed to ascertain a few elementary facts about his inten- stored as a list of words in a format amenable for later use by
tions. These will be used by the knowledge-based module of the system:
the system to select the right vocabulary and an adequate set
of verse examples from the available corpus.
At present, the system is designed to operate with the (message Peter loves Mary
following parameters: they go together to the beach)

² Approximate length of the poem. The user has to provide Every word in the message is considered a good candi-
a numerical value for the number of lines he would like to date to contribute to the ®nal poem. Statistical methods of
obtain. The system uses this number in working out an natural language processing applied in the ®eld of informa-
adequate strophic form (or combination of strophic tion retrieval favour an initial trimming of user queries with
forms) for the poem. The user is also asked whether the a view to retaining for processing only terms that have
stated length is a rigid or ¯exible constraint. relevance for the retrieval task. Stop lists are applied in
² Rhyme structure. Some strophic forms have rigid rhyme order to eliminate empty words (pronouns, articles, preposi-
structures (there are constraints on the rhyme of every tions,¼). For the present purposes, however, the presence
line) and others are more ¯exible (there are constraints on of words of these types allows the user to control the style
P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188 185

and appearance of the ®nal result even more (or at least as (emp 0) (term 0) (cat NCMS)
much as) nouns, verbs and adverbs. (rima en) (level nil))

3.2. The Poetry Expert knowledge base An entry must provide all the necessary information for
imposing the metric restrictions: length of the word in sylla-
The Poetry Expert knowledge base contains two distinct
bles (numsil), position of stresses syllable (accent),
sets of rules that encode speci®c knowledge concerning the
whether the word starts (emp) or ends (term) with a
relationship between strophic forms, the user's wishes, and
vowel, the POS tag for the word (cat), and the rhyme
the available data ®les. Their job is to select the best avail-
(rima). An additional level ®eld is provided to enable
able combination of strophic form and data ®les to suit the
priority marking of the words during later processing.
user's request.
For the resulting choice of strophic form speci®c line
The ®rst set of rules concerns the choice of strophic form
patterns/examples are loaded. A line pattern/example is a
and the selection of data ®les with the required sets of verse
CLIPS fact of the form:
examples/patterns. They have been obtained by a knowl-
edge acquisition process performed systematically over
the author's personal experience, careful analysis of classi- ((sample (n 72)
cal Spanish poetry, and available references on poetic analy- (patt NCMS PDEL NCMS NCMS
sis [10]. This gave rise to a complex set of rules that relate DET PPO3FS NCFS)
possible combinations of input parameters with possible (words desde_n del cielo
outputs (strophic forms or combinations of strophic error de la ventura)
forms). The relationship is mostly associative, but requires (beg 0) (end 1) (level nil))
a step of arithmetic calculation when processing the
required length. The decisions embodied in the rules follow where n is a unique identi®er for the speci®c sample, patt
roughly the following guidelines: the set of POS tags corresponding to the sample Ð which
acts as line patternÐ, words the actual line example, beg
² formal poem ! strophic forms of 11 syllables; encodes information about whether the line starts a
² informal ! strophic forms of 8 syllables; sentence, end encodes information about whether the line
² long and ¯exible ! romance or terceto encadenado; ends a sentence, and the level ®eld is used for priority
² short and concise ! terceto; settings.
² fully rhymed ! cuarteto or terceto encadenado; The words in the intended message provided by the user
² loosely rhymed ! romance (long) or terceto (short); are distributed into as many fragments as there are lines in
² many similar rhymes ! dos cuartetos (not too long) or the chosen strophic form, retaining within each fragment the
romance (long). original order of appearance. For instance, supposing the
message presented above were to be rewritten as a terceto,
The second set of rules associates the information it would be split by the system into the following facts:
obtained from the user regarding setting and mood desired
for the poem with the various data ®les over which the (fragment 1 Peter loves Mary)
available vocabulary is distributed. (fragment 2 they go together)
The application of the Poetry Expert knowledge base (fragment 3 to the beach)
results in a message to the user proposing a speci®c strophic
form. If the user accepts the proposal, the corresponding
This is not considered a draft of the poem, but only as an
data ®les are loaded and the system moves onto the next
approximate distribution of information over lines of the
stage. If the user rejects the proposal, the system allows the
poem.
user's choice of strophic form to override its own sugges-
A module of the system works out the similarities
tion. The knowledge base is then addressed for the right
between the line fragments and the available line exam-
combination of data ®les and these are loaded. Mismatching
ples/patterns. Each fragment/pattern pair is indexed with a
speci®cations of poem length or degree of formality and
numerical value indicating their similarity. In the initial
choice of strophic form may lead to non termination.
approximation, this similarity value is worked out as the
3.3. The elementary planning step number of POS tags they have in common. The results of
these similarity calculations are later used during the CBR
Given the user's choice of basic parameters the system Retrieve step.
uploads an appropriate combination of data ®les containing Another module counts the number of rhymes available
vocabulary extracts. A vocabulary entry for a word is a (if any) for each of the pre-selected words. These numbers
CLIPS fact of the form: are later used to assign speci®c words and patterns to each
fragment during the CBR Retrieve step: a pattern is only
(word (cual desde_n) (numsil 2) (accent 2) good for a given line in the poem if there is a word of the
186 P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188

necessary rhyme whose POS matches the last POS tag in the draft of the current line and the process is iterated. The
pattern. constructive requirements are implemented in the form of
The CBR Retrieve step can be considered to start during imperative Boolean functions.
the planning stage, since line patterns/examples are assigned If no valid extension is found, the system allows limited
to the different fragments of the poem at this stage. This is backtracking: the last word to be added can be removed and
because the retrieval of resources for one line is not an alternative attempted. An additional process of annota-
independent from the assignation of resources to its neigh- tion takes place to avoid a repetition of alternatives that have
bours. It is important, for instance, to ensure that consecu- already been tried.
tive lines are assigned sets of patterns that allow a correct Additionally, the assignation of line examples/patterns to
linguistic ®t between the resulting lines (the sentence frag- each fragment of the poem can be revised during the Reuse
ment in the ®rst line can be continued with the sentence in step if no solution is found with the existing assignation
the following one, or there are patterns for starting a once all possible backtracking alternatives over the assigned
sentence on the following line if patterns in the ®rst line words have been exhausted. If the assignation of line exam-
include an end of sentence at the end of the line). ple/pattern is modi®ed, the assignation of words may have
to be revised. This new word assignation is now not only
3.4. The CBR approach to line generation constrained by the words assigned to previous fragments,
but also by the words already assigned to following frag-
A different CBR process is set in motion for each line in ments. However, if the generation process for any previous
the poem. This is done sequentially starting from the ®rst line has already ®nished at that point, any words of its
line, but none of the different CBR processes progresses fragment of the intended message that have not been used
onto its next stage until all the other processes are ready can be considered.
to do so as well: all processes retrieve their vocabularies
and line examples, all processes adapt their selection to
generate a new line (the revision and analysis phases can 3.4.3. Revise step
be done in any order). This ensures that no two lines in the As soon as all the generation processes have concluded,
same poem are built following the same pattern and that the whole poem draft is presented to the user. The user is
words are not repeated in a poem. required to validate each of the lines. If the user comes up
with possible modi®cations, the system accepts them
3.4.1. Retrieve step instead of the generated verse. The modi®ed versions
For each fragment of the poem, adequate words and suggested by the user ought to be tested for metric correct-
adequate line patterns/examples must be selected. Line ness. This feature is not currently contemplated, under the
examples/patterns have already been assigned during the assumption that any corrections the user makes will either
planning stage. be well founded or they will be in repair of a serious
A module assigns priorities to all the available words, so syntactic or semantic error introduced by the heuristic
that only the most adequate words are considered for each approximation.
line. The criteria used in this assignation are, in decreasing
order of priority: words actually appearing in the corre- 3.4.4. Retain step
sponding fragment of the intended message, words with All verses validated by the user are processed to create a
the required rhyme for the line. personal data ®le containing the corresponding line
These priorities can be modi®ed once the initial lines examples/patterns in the correct format. Any new words
have been generated, to include any words in the fragment introduced by the user either as part of the intended message
of the intended message corresponding to previous lines that or modi®cations of the proposed draft are also added to the
have not been used in the generation of the actual verse. data. This will ensure that regular use of the system will
improve the quality of results only if the degree of satisfac-
3.4.2. Reuse step tion with the initial poems is reasonable high. This implies
For each fragment of the intended message±and the sets that although the system is capable of a certain amount of
of line examples/patterns and of selected words now learning once a reasonable standard (of vocabulary and
associated with it, the basic generation algorithm following stored examples) has been achieved, an initial threshold of
the constructive rules for the appropriate line length is vocabulary and corpus adequacy must be met for the system
applied. to function adequately.
The elementary generation units are the line pattern being
followed (which acts as guiding form) and the draft of the 3.5. ASPERA results: examples
current line. At each step of the generation a word is chosen
to match the next POS tag in the line pattern (always accord- The following examples illustrate system input and
ing to the established priority ordering). If the chosen word resulting poem for speci®c instances of use of the ASPERA
meets the constructive requirements, it is appended to the system. Suppose the user expressed a desire for a short, fully
P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188 187

rhymed, formal poem, with a rural setting and a positive The poem as it stands is quite obscure, however, it can be
mood. seen very clearly in this case how the speci®cation and the
The system suggested a terceto should be attempted (lines motives Ð rural and positive Ð drive the system.
11 syllables long rhyming ABA), and provided a set of
model poems from its case base. Model poems were of
the form given in example 0: 4. Bene®ts to be expected from ASPERA

Sabed que en mi perfecta edad y armado ASPERA may prove bene®cial to a certain extent in two
con mis ojos abiertos me he rendido different contexts. Within the restricted domain of tuition in
al ninÄo que sabeÂis ciego y desnudo. the ®eld of literature, and more widely where it may shed
Example 0. Model poem light on general language problems.
Since rhyme restrictions are imposed by the generation
mechanisms independently of the model poems, these need 4.1. As a pedagogical tool
not follow the rhyming pattern required. The model poems In the long run, it is hoped that ASPERA will provide
provide guidance as to the number and speci®c POS guidelines to develop better pedagogical tools for the ®eld
elements to be used in constructing each line. of Spanish poetry. For the average person, a poem is either
The following speci®cation was given to guide the search pleasing or not, and the introduction of Ð sometimes very
in example 1: complex Ð rules to be computed as part of its enjoyment
tan hermoso viento fue corazoÂn mudo goes against the grain on ®rst time acquaintance. ASPERA
provides the means for students to see how the imposition of
Vocabulary ®les appropriate to the setting and mood were the formal rules may affect the form of a message of their
loaded and the system produced the following poem: choosing, without requiring them to have learnt all possible
combinations of the rules. It is expected that interacting with
Ladrara la verdad el viento airado
the system may help the students to develop Ð without
en tal corazoÂn por una planta dulce
learning the formal rules Ð the instinctive feel for `correct-
al arbusto que volaÂis mudo o helado. Example 1.
ness' of a verse that a poet achieves naturally.
Three Ð viento, corazoÂn and mudo Ð of the six words in
the speci®cation have made it into the 20 words of the ®nal 4.2. As a potential source for slim language processing
verse. Six words of the poem originate in the selected vocabu- heuristics
lary Ð ladraraÂ, planta, and arbusto through the rural require-
ment and dulce, verdad, and volais from the positive mood. The solutions applied in ASPERA to language problems
Two words Ð airado and helado Ð come from the model are all highly heuristic in nature, and resort to no complex
poems. These words are forced to appear in the poem by the linguistics techniques. The examples presented show the
additional restrictions posed by the rhyme on the ®nal words of advantages and the shortcomings of the approach: message
the ®rst and last line. As inexperienced human poets do, content gets scrambled for the sake of form, yet applications
ASPERA simply chooses two words that rhyme and happens relying very heaviliy on speci®c formats and not requiring
to ®nd more of those among the model poems. 1 The rest of the originality may ®nd the simplicity of the techniques
words form part of ASPERA's elementary vocabulary and are compensates for the loss of precision. From this point of
used to hold the poem together with an approximation of sense. view the ASPERA system, as it is evolved to more re®ned
In this particular case, the last line of the resulting poem closely heuristics solutions to language generation, constitutes a
follows the structure of the last line of the sample model poem benchmark for simpli®ed approaches.
presented. The structure of the other lines is based on different
model poems, chosen by the planning stage of the system to
5. Conclusions
ensure minimal overall coherence of the poem.
A similar analysis can be carried out for example 2:
ASPERA is the computing heart of an application with a
Andando con arbusto fui pesado great potential for user satisfaction. In its current version, it
vuestras hermosas nubes por mirarme is handicapped by clumsy interfaces that are unable to
quien antes en la liebre fue templado. compete with state of the art GUI technology. However,
Example 2. the underlying methodologies and techniques have shown
their adequacy to the task even in their budding state of
resulting from similar general choices and the speci®cation: development. The heuristics techniques applied to resolve
andando por el monte hermosas nubes una liebre linguistic problems at all levels Ð syntactic and semantic
Ð open interesting avenues of research in language proces-
1
This behaviour may improve if enough rhyming words are provided sing. The system is open to enhancement and adaptation
either in the selected vocabulary or the speci®cation. once user feedback has been gathered during evaluation.
188 P. GervaÂs / Knowledge-Based Systems 14 (2001) 181±188

References de poesõÂa formal en castellano, Procesamiento del Lenguaje Natural,


SEPLN 24 (2000) 27±34.
[1] A. Aamodt, E. Plaza, Case-based reasoning: foundational issues, [6] P. GervaÂs, A logic programming application for the analysis of Span-
ish verse, in: J. Lloyd, et al. (Eds.), Computational Logic Ð CL 2000,
methodological variations, and system approaches, AI Commun. 7
Springer, Berlin, 2000, pp. 1330±1344.
(i) (1994) 39±59.
[7] H. Horacek, S. Busemann, Towards a methodology for developing
[2] P. Bailey, A reader-based model of story generation, Symposium on
application-oriented report generation, in: A. GuÈnter, O. Herzog
Arti®cial Intelligence and Creative Language: Stories and Humour,
(Eds.), 22nd German Conference on Arti®cial Intelligence (KI-98),
AISB'99 Convention, 6th±9th April 1999, Edinburgh College of Art
Proceedings, Bremen, Germany, 1998.
and Division of Informatics, University of Edinburgh.
[8] H.M. Manurung, G. Ritchie, H. Thompson, Towards a computational
[3] K. Chevreau, J. Coch, J. GarcõÂa Moya, M. Alonso, GeneracioÂn multi-
model of poetry generation, in: Time for AI and Society, Proceedings
linguÈe de boletines meteoroloÂgicos, Procesamiento del Lenguaje
of the AISB-00 Symposium on Creative and Cultural Aspects and
Natural, SEPLN, N. 25 (1999) 51±58.
Applications of AI and Cognitive Science, University of Birmingham,
[4] P. GervaÂs, WASP: evaluation of different strategies for the automatic
England, 17th±18th April 2000.
generation of spanish verse, in: time for AI and society, in: Proceed-
[9] M.-J. Nederhof, Ef®cient generation of random sentences, Encyclo-
ings of the AISB-00 Symposium on Creative and Cultural Aspects paedia Comput. Sci. Technol. 41 (1999) 45±65.
and Applications of AI and Cognitive Science, University of Birming- [10] A. Quilis, MeÂtrica espanÄola, Ariel, Barcelona, 1985.
ham, England, 17th±18th April 2000, pp. 93±100. [11] Real Academia EspanÄola (ComisioÂn de GramaÂtica), Esbozo de una
[5] P. GervaÂs, Un modelo computacional para la generacioÂn automaÂtica nueva gramaÂtica de la lengua espanÄola, Espasa-Calpe, Madrid, 1986.

You might also like