Information Technology Reference
In-Depth Information
HYPERNYM-OF a < arg1 > like a < arg2 >
HYPERNYM-OF → < arg2 > is a delicious < arg1 >
HYPERNYM-OF
→ <
arg2
>
before
<
arg1
>
Fig. 12.3 Chart parser example rules
be ranked according to their structural relevance to the seeds. The n highest-ranked
nodes are selected.
12.3.2.2 Grammar Processor
The Grammar Processor is an interface for the generation grammar. Similarly
to Manurung [ 23 ], to perform chart generation, the Grammar Processor uses a
chart-parser in the opposite direction. The body of the rules should consist of nat-
ural language renderings of semantic relations and there must be a direct mapping
between the relation names, in the graph, and the name of the head rules, in the gram-
mar. Besides the simple terminal tokens, that will be present in the poem without
any change, the Grammar Processor supports terminal tokens that indicate the posi-
tion of the relation arguments (
), to be filled by the Sentence
Generator. This way, given a relation predicate, the Grammar Processor can retrieve
one (or several) renderings for a given relation instance.
PoeTryMe uses an implementation of the Earley [ 9 ] chart-parsing algorithm 1 that
analyses sentences according to input grammars, which are editable text files. A
very simple example of a valid rule set, with three hypernymy patterns, is shown
in Fig. 12.3 . These rules could be used to generate sentences such as: atoollikea
hammer , mango is a delicious fruit , man before animal .
<
arg1
>
and
<
arg2
>
12.3.2.3 Contextualizer
The ability to explain how its artefacts are created is an important feature of a creative
system. PoeTryMe provides this feature by keeping track of all the relation instances
that originated each line. These can later be used to contextualize the poem by
indicating the relation instances used to form the lines and how they are connected to
a word in the generation domain. The context can be a mere list of relation instances
or, if a grammar is provided specifically for this purpose, it can be a natural language
piece of text.
1 Parser available from http://code.google.com/p/pen/ .
 
Search WWH ::




Custom Search