|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--opennlp.grok.knowledge.DM
The DM is an object which keeps track of the model of the discourse. It is a hashmap containing FC (filecard) objects. It also contains an ISA heirarchy that is constantly updated as new ISA links are created during the discourse.
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
| Constructor Summary | |
DM()
class constructor: create empty DM |
|
DM(java.lang.String file)
class constructor: create DM with info supplied by XML file |
|
| Method Summary | |
void |
addFC(opennlp.common.discourse.FC fc)
Adds a new FC to the DM, hashed by its id number. |
void |
addProposition(opennlp.common.synsem.Denoter cat)
Adds a proposition to the list of propositions that the Brain has evaluated. |
void |
addRestriction(opennlp.common.unify.Variable v,
opennlp.common.synsem.Abstraction p)
|
void |
clearRestrictions()
|
opennlp.common.structure.Category |
describe(opennlp.common.structure.Category c)
Take a semantic form and describe it (if it is not already). |
opennlp.common.discourse.FC |
getFC(opennlp.common.synsem.Denoter c)
Returns the FC which the resolver thinks best matches the category c. |
opennlp.common.discourse.FC |
getFC(opennlp.common.synsem.Denoter c,
opennlp.common.discourse.AccommodatePolicy ap)
Returns the FC which the resolver thinks best matches c given the accomodation policy. |
opennlp.common.discourse.FC |
getFC(GrokSet gs)
Returns the FC which contains the same GrokSet. |
opennlp.common.structure.Hierarchy |
getISA()
Returns the isa heirarchy for this DM |
opennlp.common.discourse.Kind |
getNode(opennlp.common.synsem.Abstraction c)
Returns the node which the resolver thinks best matches the category c. |
opennlp.common.discourse.Kind |
getNode(opennlp.common.synsem.Abstraction c,
opennlp.common.discourse.AccommodatePolicy ap)
|
java.util.ArrayList |
getPropList()
Access method for the proposition list. |
opennlp.common.discourse.SalienceList |
getSalList()
Access method for the salience list. |
boolean |
isConsistent(opennlp.common.unify.Variable v,
opennlp.common.discourse.Referable r)
|
java.util.Iterator |
iterator()
Provides an iterator through the keySet of this DM. |
void |
loadXmlFile(java.lang.String file)
Loads an XML file and uses the information which it contains to fill in information in the DM. |
void |
merge(opennlp.common.discourse.FC a,
opennlp.common.discourse.FC b,
boolean polarity)
Merge two file cards into one (because they are the same thing) |
void |
ModuleChanged(java.lang.String module,
java.lang.String instance)
Listen for changes in modules |
java.lang.String |
printISA()
Prints the ISA heiarchy. |
void |
removeFC(opennlp.common.discourse.FC fc)
removes a FC from the dm as well as the ISA |
void |
setHigherKnowledge(opennlp.common.structure.KB hk)
Sets hk as the instance of HigherKnowledge |
void |
setSalList(opennlp.common.discourse.SalienceList s)
|
java.lang.String |
toString()
Prints the FCs which this DM contains. |
void |
updateSalience(opennlp.common.synsem.Denoter cat)
|
void |
updateSalience(opennlp.common.discourse.Referable ref,
int utt,
int pos)
update the salience model based on the category |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
public DM()
public DM(java.lang.String file) throws opennlp.common.structure.CatParseException
file - The name of the XML file to load.opennlp.common.structure.CatParseException - Cannot parse semantics in rule of lex file| Method Detail |
public void addRestriction(opennlp.common.unify.Variable v,
opennlp.common.synsem.Abstraction p)
addRestriction in interface opennlp.common.structure.KBpublic void clearRestrictions()
clearRestrictions in interface opennlp.common.structure.KB
public boolean isConsistent(opennlp.common.unify.Variable v,
opennlp.common.discourse.Referable r)
isConsistent in interface opennlp.common.structure.KB
public void loadXmlFile(java.lang.String file)
throws opennlp.common.structure.CatParseException
file - The name of the XML file to load.public void setHigherKnowledge(opennlp.common.structure.KB hk)
setHigherKnowledge in interface opennlp.common.structure.KBhk - The knowledge base to use as HigherKnowledgepublic opennlp.common.structure.Hierarchy getISA()
getISA in interface opennlp.common.structure.KBpublic opennlp.common.discourse.SalienceList getSalList()
getSalList in interface opennlp.common.structure.KBpublic void setSalList(opennlp.common.discourse.SalienceList s)
setSalList in interface opennlp.common.structure.KBpublic java.util.ArrayList getPropList()
getPropList in interface opennlp.common.structure.KBpublic java.util.Iterator iterator()
iterator in interface opennlp.common.structure.KB
public void updateSalience(opennlp.common.discourse.Referable ref,
int utt,
int pos)
updateSalience in interface opennlp.common.structure.KBpublic void updateSalience(opennlp.common.synsem.Denoter cat)
updateSalience in interface opennlp.common.structure.KBpublic void addProposition(opennlp.common.synsem.Denoter cat)
addProposition in interface opennlp.common.structure.KBpublic void addFC(opennlp.common.discourse.FC fc)
addFC in interface opennlp.common.structure.KBpublic void removeFC(opennlp.common.discourse.FC fc)
removeFC in interface opennlp.common.structure.KB
public opennlp.common.discourse.FC getFC(opennlp.common.synsem.Denoter c)
throws opennlp.common.discourse.AccommodateException
getFC in interface opennlp.common.structure.KBc - The category to use in the resolution.
public opennlp.common.discourse.FC getFC(opennlp.common.synsem.Denoter c,
opennlp.common.discourse.AccommodatePolicy ap)
throws opennlp.common.discourse.AccommodateException
getFC in interface opennlp.common.structure.KBc - The category to use in the resolution.public opennlp.common.discourse.FC getFC(GrokSet gs)
public opennlp.common.discourse.Kind getNode(opennlp.common.synsem.Abstraction c)
throws opennlp.common.discourse.AccommodateException
getNode in interface opennlp.common.structure.KBc - The category to use in the resolution.
public opennlp.common.discourse.Kind getNode(opennlp.common.synsem.Abstraction c,
opennlp.common.discourse.AccommodatePolicy ap)
throws opennlp.common.discourse.AccommodateException
getNode in interface opennlp.common.structure.KBpublic opennlp.common.structure.Category describe(opennlp.common.structure.Category c)
describe in interface opennlp.common.structure.KB
public void merge(opennlp.common.discourse.FC a,
opennlp.common.discourse.FC b,
boolean polarity)
merge in interface opennlp.common.structure.KBpublic java.lang.String printISA()
public java.lang.String toString()
toString in class java.util.AbstractMap
public void ModuleChanged(java.lang.String module,
java.lang.String instance)
ModuleChanged in interface ModuleListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||