Information Technology Reference
In-Depth Information
predefined metre, Syllable Utils provides several syllable-related operations, includ-
ing syllable division, stress and rhyme identification (for rhymes).
We recall that an instantiation of the Generation Strategy does not generate sen-
tences. It just follows a plan to select the most suitable sentences for each line.
Selection heuristics might consider features like metre, rhyme, coherence between
lines or other, depending on the desired purposes.
12.3.2 Sentence Generator
The Sentence Generator is the core module of PoeTryMe's architecture. It is used to
generate meaningful natural language sentences, with the help of:
A semantic graph , managed by the Relations Manager. Its nodes are words and
its edges are labelled according to a relation predicate. A tuple t
={
node 1 ,
predicate
,
node 2 }
establishes a relational instance;
Generation grammars , processed by the Grammar Processor, which contain tex-
tual renderings for the (chart) generation of grammatical sentences that express
semantic relations.
The generation of a sentence starts by selecting a random relation instance, e.g.
t
, from the semantic graph. Then, a random rendering
for the predicate of t is retrieved from the grammar. After inserting the arguments of t
in the rule body, the resulting sentence is returned. A thirdmodule, the Contextualizer,
keeps track of the instances that were used to generate each line and may be used to
explain the choices made.
={
word 1 ,
predicate
,
word 2 }
12.3.2.1 Relations Manager
The Relations Manager is an interface to the semantic graph. It may be used, for
instance, to retrieve all words related to another, or to check if two words are related.
In order to narrow the space of possible generations, a set of seed words is pro-
vided to the Relations Manager. This set will define the generation domain, used
for selecting a subgraph from the main semantic graph. There, the relation instances
should either contain one of the seed words or somehow related words. More pre-
cisely, the subgraph will only contain relation instances with words that are at most
ʴ
nodes far from a seed word, where
ʴ
is a neighbourhood depth threshold. It is
also possible to define a surprise factor,
ʽ
, interpreted as the probability of selecting
instances one level further than
.
The number of seed words is open, and it can be enlarged with the top n relevant
words for those seeds. For this purpose, the PageRank [ 4 ] algorithm is run in the full
semantic graph. Initial node weights are uniformly distributed across the seed words,
while the rest of the nodes have an initial weight of 0. After 30 iterations, nodes will
ʴ
Search WWH ::




Custom Search