story.scheherazade.verbalizer
Class Verbalizer

java.lang.Object
  extended by story.scheherazade.verbalizer.Verbalizer

public class Verbalizer
extends java.lang.Object

Class that generates English-language serializations of story components, intended mostly for use within the Virgil interface.


Constructor Summary
Verbalizer(PlannerRepository planners)
           
 
Method Summary
 VerbalizerState freshState()
          Make a fresh copy of the default opening VerbalizerState.
static java.lang.String renderOrdinality(int ordinality)
          Utility to render as a string some ordinality ("first", "second" etc.)
 Serialization verbalize(StoryInterpreter story, Style style, DiscourseCommand command)
          Run a single verbalize command.
 Serialization verbalize(StoryInterpreter story, Style style, DiscourseCommand command, VerbalizerState state)
          Run a single verbalize command with a given initial state.
 Serialization verbalize(StoryInterpreter story, Style style, DiscoursePlan plan)
          Run a sequence of verbalize commands.
 Serialization verbalize(StoryInterpreter story, Style style, DiscoursePlan plan, VerbalizerState state)
          Run a sequence of verbalize commands with a given initial state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Verbalizer

public Verbalizer(PlannerRepository planners)
           throws Scheherexception
Throws:
Scheherexception
Method Detail

verbalize

public Serialization verbalize(StoryInterpreter story,
                               Style style,
                               DiscoursePlan plan)
                        throws Scheherexception
Run a sequence of verbalize commands.

Throws:
Scheherexception

verbalize

public Serialization verbalize(StoryInterpreter story,
                               Style style,
                               DiscourseCommand command)
                        throws Scheherexception
Run a single verbalize command.

Throws:
Scheherexception

verbalize

public Serialization verbalize(StoryInterpreter story,
                               Style style,
                               DiscoursePlan plan,
                               VerbalizerState state)
                        throws Scheherexception
Run a sequence of verbalize commands with a given initial state.

Throws:
Scheherexception

verbalize

public Serialization verbalize(StoryInterpreter story,
                               Style style,
                               DiscourseCommand command,
                               VerbalizerState state)
                        throws Scheherexception
Run a single verbalize command with a given initial state.

Throws:
Scheherexception

freshState

public VerbalizerState freshState()
Make a fresh copy of the default opening VerbalizerState.


renderOrdinality

public static java.lang.String renderOrdinality(int ordinality)
                                         throws Scheherexception
Utility to render as a string some ordinality ("first", "second" etc.)

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.