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.chat
Class ChatInterpreter

    java.lang.Object
      |
      +--org.opencyc.chat.ChatInterpreter

public class ChatInterpreter
extends java.lang.Object

Provides a chat conversation interpreter.

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
`protected ChatterBot` | `chatterBot` the chatterbot
`protected CycAccess` | `cycAccess` Provides wrappers for the Cyc API and manages the connection to the Cyc server.
`protected Interpreter` | `interpreter` the state machine interpreter

Constructor Summary
`ChatInterpreter(CycAccess cycAccess)` Constructs a new ChatInterpreter object given the cyc api access object.

Method Summary
`ChatterBot` | `getChatterBot()` Gets the chatterbot
`Interpreter` | `getInterpreter()` Gets the state machine interpreter
`void` | `receiveChatMessage(java.lang.String chatUserNickname, java.lang.String chatMessage)` Receives the given chat message from the given chat partner.
`void` | `sendChatMessage(java.lang.String chatMessage)` Sends the given chat message into the chat system.
`void` | `setChatterBot(ChatterBot chatterBot)` Sets the chatterbot
`void` | `setInterpreter(Interpreter interpreter)` Sets the state machine interpreter

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

Field Detail

### chatterBot

    protected ChatterBot chatterBot

  the chatterbot

### interpreter

    protected Interpreter interpreter

  the state machine interpreter

### cycAccess

    protected CycAccess cycAccess

  Provides wrappers for the Cyc API and manages the connection to the Cyc server.

Constructor Detail

### ChatInterpreter

    public ChatInterpreter(CycAccess cycAccess)

  Constructs a new ChatInterpreter object given the cyc api access object.
  Parameters:
    `cycAccess` - the given cyc api access object

Method Detail

### sendChatMessage

    public void sendChatMessage(java.lang.String chatMessage)
                         throws ChatException

  Sends the given chat message into the chat system.
  Parameters:
    `chatMessage` - the chat message

### receiveChatMessage

    public void receiveChatMessage(java.lang.String chatUserNickname,
                                   java.lang.String chatMessage)
                            throws CycApiException,
                                   java.io.IOException,
                                   java.net.UnknownHostException,
                                   ChatException

  Receives the given chat message from the given chat partner. Delegates the message understanding and response to the chat interpreter.
  Parameters:
    `chatUserNickname` - the preferred name (possibly not unique) of the chat partner
    `chatMessage` - the chat message

### getInterpreter

    public Interpreter getInterpreter()

  Gets the state machine interpreter
  Returns:
    the state machine interpreter

### setInterpreter

    public void setInterpreter(Interpreter interpreter)

  Sets the state machine interpreter
  Parameters:
    `interpreter` - the state machine interpreter

### getChatterBot

    public ChatterBot getChatterBot()

  Gets the chatterbot
  Returns:
    the chatterbot

### setChatterBot

    public void setChatterBot(ChatterBot chatterBot)

  Sets the chatterbot
  Parameters:
    `chatterBot` - the chatterbot

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