opennlp.grok.knowledge
Class Brain

java.lang.Object
  |
  +--opennlp.grok.knowledge.Brain
All Implemented Interfaces:
ModuleListener

public class Brain
extends java.lang.Object
implements ModuleListener

The Brain is the central processing point for many different bits of information. It coordinates a discourse model, generator, salience list and salience tracker as they update for the semantic expressions which the Brain is asked to evaluate.

Version:
$Revision: 1.1.1.1 $, $Date: 2001/10/23 15:17:51 $
Author:
Jason Baldridge

Field Summary
 opennlp.common.discourse.AccommodatePolicy ap
          The module which determines whether or not new discourse and isa information should be accommodated.
 opennlp.common.discourse.AccommodatePolicy qap
          The module which determines whether or not new discourse and isa information should be accommodated during queries.
 
Constructor Summary
Brain()
          class constructor: creates new empty Brain
Brain(opennlp.common.generate.Generator g, java.lang.String wkfile)
          class constructor: creates new Brain with a generator and world knowledge
Brain(java.lang.String wkfile)
           
 
Method Summary
 void addMouth(opennlp.common.generate.Mouth m)
          Adds a mouth.
 boolean canTalk()
          Returns false if there are no mouths for this Brain.
 opennlp.common.structure.KB getDM()
          Returns the DM's DM heiarchy.
 opennlp.common.structure.Hierarchy getDMISA()
          Returns the DM's ISA heiarchy.
 java.util.ArrayList getMouths()
          Returns the objects which speak for this Brain.
 opennlp.common.discourse.SalienceList getSalList()
          Access method for the salience list.
 opennlp.common.discourse.Referable interpret(opennlp.common.unify.Feature f, opennlp.common.synsem.Denoter assert, AltSet presupps)
          Interpret a semantic form which the parser has produced.
 opennlp.common.discourse.Referable interpretLFs(opennlp.common.unify.Feature f, opennlp.common.synsem.Denoter assert, AltSet presupps)
           
 void ModuleChanged(java.lang.String module, java.lang.String instance)
          Listen for changes in modules
 java.lang.String printEnts()
          Prints the filecards in the discourse model.
 java.lang.String printProp()
          Prints the propositions evaluated thus far.
 java.lang.String printSal()
          Prints the salience list.
 void removeMouth(opennlp.common.generate.Mouth m)
          Removes a mouth.
 void setMouths(java.util.ArrayList m)
          Sets the objects which speak for this Brain.
 void speak(java.lang.String str)
          Tel this Brain's mouths to say something.
 void stopTalking()
          Tell this Brain's mouths to clear (stop saying whatever they were saying).
 java.lang.String toString()
          Prints out the proposition list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ap

public opennlp.common.discourse.AccommodatePolicy ap
The module which determines whether or not new discourse and isa information should be accommodated.

qap

public opennlp.common.discourse.AccommodatePolicy qap
The module which determines whether or not new discourse and isa information should be accommodated during queries.
Constructor Detail

Brain

public Brain()
class constructor: creates new empty Brain

Brain

public Brain(java.lang.String wkfile)
      throws opennlp.common.structure.CatParseException

Brain

public Brain(opennlp.common.generate.Generator g,
             java.lang.String wkfile)
      throws opennlp.common.structure.CatParseException
class constructor: creates new Brain with a generator and world knowledge
Parameters:
g - The generator to use with this Brain.
wkfile - The XML file which contains the world knowledge info.
Method Detail

getSalList

public opennlp.common.discourse.SalienceList getSalList()
Access method for the salience list.

getMouths

public java.util.ArrayList getMouths()
Returns the objects which speak for this Brain.

setMouths

public void setMouths(java.util.ArrayList m)
Sets the objects which speak for this Brain.

addMouth

public void addMouth(opennlp.common.generate.Mouth m)
Adds a mouth.

removeMouth

public void removeMouth(opennlp.common.generate.Mouth m)
Removes a mouth.

canTalk

public boolean canTalk()
Returns false if there are no mouths for this Brain.

speak

public void speak(java.lang.String str)
Tel this Brain's mouths to say something.

stopTalking

public void stopTalking()
Tell this Brain's mouths to clear (stop saying whatever they were saying).

getDMISA

public opennlp.common.structure.Hierarchy getDMISA()
Returns the DM's ISA heiarchy.

getDM

public opennlp.common.structure.KB getDM()
Returns the DM's DM heiarchy.

printProp

public java.lang.String printProp()
Prints the propositions evaluated thus far.

printSal

public java.lang.String printSal()
Prints the salience list.

printEnts

public java.lang.String printEnts()
Prints the filecards in the discourse model.

interpretLFs

public opennlp.common.discourse.Referable interpretLFs(opennlp.common.unify.Feature f,
                                                       opennlp.common.synsem.Denoter assert,
                                                       AltSet presupps)

interpret

public opennlp.common.discourse.Referable interpret(opennlp.common.unify.Feature f,
                                                    opennlp.common.synsem.Denoter assert,
                                                    AltSet presupps)
Interpret a semantic form which the parser has produced.

ModuleChanged

public void ModuleChanged(java.lang.String module,
                          java.lang.String instance)
Listen for changes in modules
Specified by:
ModuleChanged in interface ModuleListener

toString

public java.lang.String toString()
Prints out the proposition list.
Overrides:
toString in class java.lang.Object


Copyright © 2001 Jason Baldridge and Gann Bierner. All Rights Reserved.