story.scheherazade.verbalizer
Class VerbalizeList

java.lang.Object
  extended by story.scheherazade.verbalizer.VerbalizeList
All Implemented Interfaces:
DiscourseCommand, DiscourseExecutable

public class VerbalizeList
extends java.lang.Object
implements DiscourseCommand

Indicate that a VerbalizeProgram belongs to a single list. The verbalizations that result from each command in the list will be separated by a comma, and the word "and" will precede the verbalization of the final command. If there are two or one elements, the punctuation is altered accordingly.


Constructor Summary
VerbalizeList(DiscoursePlan plan, boolean useSemis, boolean forceSeparator, boolean sequence)
          useSemis true for semis, false for commas
forceSeparator: serial comma
sequence: use for lists of actions to separate by "then" (rather than "and", with a "then" preceding EVERY element)
 
Method Summary
 Verbalization execute(StoryInterpreter story, Style style, VerbalizerState state)
           
 void intern()
           
 java.lang.StringBuffer render()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerbalizeList

public VerbalizeList(DiscoursePlan plan,
                     boolean useSemis,
                     boolean forceSeparator,
                     boolean sequence)
              throws Scheherexception
useSemis true for semis, false for commas
forceSeparator: serial comma
sequence: use for lists of actions to separate by "then" (rather than "and", with a "then" preceding EVERY element)

Throws:
Scheherexception
Method Detail

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Specified by:
render in interface DiscourseCommand
Specified by:
render in interface DiscourseExecutable
Throws:
Scheherexception

execute

public Verbalization execute(StoryInterpreter story,
                             Style style,
                             VerbalizerState state)
                      throws Scheherexception
Specified by:
execute in interface DiscourseCommand
Throws:
Scheherexception

intern

public void intern()
Specified by:
intern in interface DiscourseCommand
Specified by:
intern in interface DiscourseExecutable


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