Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opencyc.conversation
Class Performer

    java.lang.Object
      |
      +--org.opencyc.conversation.Performer

public class Performer
extends java.lang.Object

Performs actions for the chat fsm interpreter.

The chat fsm is in the form of a text fsm using asynchronous receiving and sending of messages. This interpreter contains all the possible finite state machine actions and interprets the actions required for a state transition.

Author:
  Stephen L. Reed

  Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

  the license

  www.opencyc.org

  OpenCyc at SourceForge

  THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Field Summary
`static int` | `DEFAULT_VERBOSITY` The default verbosity of the solution output.
`protected FsmFactory` | `fsmFactory` reference to the FsmFactory object
`protected CycConstant` | `inferencePsc` #$InferencePSC is a problem solving context in which all assertions in the entire KB are initially visible.
`protected Interpreter` | `interpreter` reference to the parent Interpreter object
`protected CycConstant` | `rkfEnglishLexicalMicrotheoryPsc` The context for RKF-related inferences involving all and only english lexical mts.
`protected TemplateParser` | `templateParser` reference to the TemplateParser object
`protected int` | `verbosity` Sets verbosity of the constraint solver output.

Constructor Summary
`Performer(Interpreter interpreter)` Constructs a new Performer object given the reference to the parent finite state machine interpreter object.

Method Summary
`protected void` | `doDisambiguateChoiceIsNumberAction(State currentState, Action action)` Performs the do-disambiguate-choice-is-number action
`protected void` | `doDisambiguateChoiceIsPhraseAction(State currentState, Action action)` Performs the do-disambiguate-choice-is-phrase action
`protected void` | `doDisambiguateParseTermAction(State currentState, Action action)` Performs the do-disambiguate-parse-term action.
`protected void` | `doDisambiguateTermChoiceAction(State currentState, Action action)` Performs the do-disambiguate-term-choice action.
`protected void` | `doDisambiguateTermDoneAction(State currentState)` Performs the do-disambiguate-term-done action
`protected void` | `doDisambiguateTermQuery(State currentState, Action action)` Performs the do-disambiguate term-query action.
`protected void` | `doFinalization()` Performs the do-finalization action.
`protected void` | `doNotUnderstand(State currentState, Action action)` Performs the do-not-understand action.
`protected void` | `doReplyWithFirstFact(State currentState, Action action)` Performs the reply-with-first-fact action.
`protected void` | `doReplyWithNextFact(State currentState, Action action)` Performs the repy-with-next-fact action.
`protected CycList` | `parseTermsString(java.lang.String text)` Returns the terms whose parse covers the given text.
`protected void` | `performArc(State currentState, Action action)` Performs the given action with the given current state.
`protected void` | `performArc(State currentState, Fsm subFsm)` Performs the given sub fsm with the given current state.
`void` | `setVerbosity(int verbosity)` Sets verbosity of the output.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_VERBOSITY

    public static final int DEFAULT_VERBOSITY

  The default verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### verbosity

    protected int verbosity

  Sets verbosity of the constraint solver output. 0 --> quiet ... 9 -> maximum diagnostic input.

### interpreter

    protected Interpreter interpreter

  reference to the parent Interpreter object

### fsmFactory

    protected FsmFactory fsmFactory

  reference to the FsmFactory object

### templateParser

    protected TemplateParser templateParser

  reference to the TemplateParser object

### rkfEnglishLexicalMicrotheoryPsc

    protected CycConstant rkfEnglishLexicalMicrotheoryPsc

  The context for RKF-related inferences involving all and only english lexical mts.

### inferencePsc

    protected CycConstant inferencePsc

  #$InferencePSC is a problem solving context in which all assertions in the entire KB are initially visible.

Constructor Detail

### Performer

    public Performer(Interpreter interpreter)

  Constructs a new Performer object given the reference to the parent finite state machine interpreter object.
  Parameters:
    `interpreter` - the parent finite state machine interpreter

Method Detail

### performArc

    protected void performArc(State currentState,
                              Fsm subFsm)
                       throws CycApiException,
                              java.io.IOException,
                              java.net.UnknownHostException,
                              ChatException

  Performs the given sub fsm with the given current state.
  Parameters:
    `currentState` - the current state of the finite state machine
    `subFsm` - the sub fsm to be performed.

### performArc

    protected void performArc(State currentState,
                              Action action)
                       throws CycApiException,
                              java.io.IOException,
                              java.net.UnknownHostException,
                              ChatException

  Performs the given action with the given current state.
  Parameters:
    `currentState` - the current state of the finite state machine
    `action` - the action to be performed

### doNotUnderstand

    protected void doNotUnderstand(State currentState,
                                   Action action)
                            throws ChatException

  Performs the do-not-understand action.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### doFinalization

    protected void doFinalization()

  Performs the do-finalization action.
  Parameters:
    `action` - the action object.

### doDisambiguateParseTermAction

    protected void doDisambiguateParseTermAction(State currentState,
                                                 Action action)
                                          throws CycApiException,
                                                 java.net.UnknownHostException,
                                                 java.io.IOException

  Performs the do-disambiguate-parse-term action.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### parseTermsString

    protected CycList parseTermsString(java.lang.String text)
                                throws CycApiException,
                                       java.io.IOException,
                                       java.net.UnknownHostException

  Returns the terms whose parse covers the given text.
  Parameters:
    `the` - text phrase
  Returns:
    the terms whose parse covers the given text

### doDisambiguateTermChoiceAction

    protected void doDisambiguateTermChoiceAction(State currentState,
                                                  Action action)
                                           throws CycApiException,
                                                  ChatException,
                                                  java.io.IOException

  Performs the do-disambiguate-term-choice action.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### doDisambiguateChoiceIsNumberAction

    protected void doDisambiguateChoiceIsNumberAction(State currentState,
                                                      Action action)

  Performs the do-disambiguate-choice-is-number action
  Parameters:
    `currentState` - the current fsm state
    `action` - the action containing the numeric choice

### doDisambiguateChoiceIsPhraseAction

    protected void doDisambiguateChoiceIsPhraseAction(State currentState,
                                                      Action action)

  Performs the do-disambiguate-choice-is-phrase action
  Parameters:
    `currentState` - the current fsm state
    `action` - the action containing the phrase choice

### doDisambiguateTermDoneAction

    protected void doDisambiguateTermDoneAction(State currentState)

  Performs the do-disambiguate-term-done action
  Parameters:
    `currentState` - the current fsm state

### doDisambiguateTermQuery

    protected void doDisambiguateTermQuery(State currentState,
                                           Action action)
                                    throws CycApiException,
                                           java.io.IOException,
                                           java.net.UnknownHostException

  Performs the do-disambiguate term-query action. First performs a disambiguate-term subfsm to obtain the correct term for the query.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### doReplyWithFirstFact

    protected void doReplyWithFirstFact(State currentState,
                                        Action action)

  Performs the reply-with-first-fact action.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### doReplyWithNextFact

    protected void doReplyWithNextFact(State currentState,
                                       Action action)

  Performs the repy-with-next-fact action.
  Parameters:
    `currentState` - the current fsm state
    `action` - the action object.

### setVerbosity

    public void setVerbosity(int verbosity)

  Sets verbosity of the output. 0 --> quiet ... 9 -> maximum diagnostic input.
  Parameters:
    `verbosity` - 0 --> quiet ... 9 -> maximum diagnostic input

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD