|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.nlu.AVMComposer
public class AVMComposer
AVM Composer - Reads AVPairs. Attempts composition of new AVMs and unification of existing ones.
Field Summary | |
---|---|
private java.util.ArrayList<AVM> |
avmList
|
private static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> |
avmStructures
|
private java.util.ArrayList<AVM> |
keepList
|
private org.apache.log4j.Logger |
logger
|
private java.util.ArrayList<AVM> |
resolvedList
|
private static java.util.ArrayList<AVM> |
worldList
|
Constructor Summary | |
---|---|
AVMComposer()
Creates AVMComposer with a list of prototypes (avmStructures) of different typed AVMs and a local list of composed AVMs (avmList). |
|
AVMComposer(AVMComposer c)
|
|
AVMComposer(java.lang.String worldFile)
Creates AVMComposer with a list of prototypes (avmStructures) of different typed AVMs and a local list of composed AVMs (avmList). |
|
AVMComposer(java.lang.String structureFile,
java.lang.String worldFile)
Creates AVMComposer with a list of prototypes (avmStructures) of different typed AVMs and a local list of composed AVMs (avmList). |
Method Summary | |
---|---|
java.util.ArrayList<AVM> |
compose(AVPair avp)
Method to call when a new AVPair becomes known. |
void |
composeAll(java.util.List<AVPair> avPairs)
Calls compose() for the list of AVPairs |
java.util.ArrayList<AVM> |
getAllAVMs()
Returns list of AVMs known from AVM structures. |
java.util.ArrayList<AVM> |
getAvmList()
|
java.util.ArrayList<AVM> |
getResolvedList()
Returns list of resolved AVMs (ones with which input AVPairs could be unified.) |
(package private) static void |
interactiveTest()
|
static void |
main(java.lang.String[] args)
Main method mostly for local testing. |
private void |
printAVMs()
Prints out all known AVMs. |
java.util.ArrayList<AVM> |
resolve()
Method to resolve composed AVMs in avmList with known AVMs in worldList. |
void |
setAllAVMs()
Sets prototype AVMs to be used for matching against (e.g. from new AVPairs). |
void |
setAvmList(java.util.ArrayList<AVM> avmList)
|
void |
setAVMs(java.lang.String type)
Sets only one type of AVM by creating a compose list of only that type. |
AVPair |
uniquelyResolve()
Resolves AVMs, returns only a single AVPair of one AVM if one was resolved (else null). |
void |
unsetAVMs(java.lang.String type)
Unsets AVM of a given type by removing them from avmList list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> avmStructures
private static java.util.ArrayList<AVM> worldList
private java.util.ArrayList<AVM> avmList
private java.util.ArrayList<AVM> resolvedList
private java.util.ArrayList<AVM> keepList
private org.apache.log4j.Logger logger
Constructor Detail |
---|
public AVMComposer() throws java.net.MalformedURLException
java.net.MalformedURLException
public AVMComposer(java.lang.String worldFile) throws java.net.MalformedURLException
worldFile
- with list of AVMs in the world.
java.net.MalformedURLException
public AVMComposer(java.lang.String structureFile, java.lang.String worldFile) throws java.net.MalformedURLException
structureFile
- with list of AVMstuctureworldFile
- with list of AVMs in the world
java.net.MalformedURLException
public AVMComposer(AVMComposer c)
Method Detail |
---|
public java.util.ArrayList<AVM> compose(AVPair avp)
avp
- public void composeAll(java.util.List<AVPair> avPairs)
avPairs
- list of AVPairs to be composedpublic java.util.ArrayList<AVM> resolve()
public AVPair uniquelyResolve()
public java.util.ArrayList<AVM> getResolvedList()
public java.util.ArrayList<AVM> getAllAVMs()
public void setAllAVMs()
public void setAVMs(java.lang.String type)
type
- public void unsetAVMs(java.lang.String type)
type
- private void printAVMs()
public java.util.ArrayList<AVM> getAvmList()
public void setAvmList(java.util.ArrayList<AVM> avmList)
avmList
- the avmList to setstatic void interactiveTest() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
args
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |