|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.Graphmaster
public class Graphmaster
The Graphmaster
is the "brain" of an Alicebot.
It consists of a collection of nodes called Nodemapper
s.
These Nodemapper
s map the branches from each node.
The branches are either single words or wildcards.
The root of the Graphmaster
is a Nodemapper
with many branches, one for each of the first words of all the patterns
(40,000 in the case of the A.L.I.C.E. brain). The number of leaf nodes
in the graph is equal to the number of categories, and each leaf node
contains the <template> tag.
Field Summary | |
---|---|
static java.lang.String |
ACTIVATIONS
Activations marker. |
static java.lang.String |
ASTERISK
The * wildcard. |
static java.lang.String |
BOTID
A botid marker. |
static java.lang.String |
BUILD
Build Number of this package (internal regression test control). |
static java.lang.String[] |
COPYRIGHT
Copyright notice. |
static java.lang.String |
FILENAME
A filename marker. |
static java.lang.String |
PATH_SEPARATOR
A path separator. |
protected static int |
RESPONSE_TIMEOUT
The response timeout. |
static java.lang.String |
TEMPLATE
A template marker. |
static java.lang.String |
THAT
A that marker. |
static java.lang.String |
TOPIC
A topic marker. |
static java.lang.String |
UNDERSCORE
The _ wildcard. |
static java.lang.String |
VERSION
Version of this package. |
Method Summary | |
---|---|
static void |
activatedNode(Nodemapper nodemapper)
Adds a given Nodemapper to the set of activated nodes. |
static Nodemapper |
add(java.lang.String pattern,
java.lang.String that,
java.lang.String topic,
java.lang.String botid)
Adds a new pattern-that-topic path to the Graphmaster root. |
static void |
checkpoint()
Sends new targeting data to org.alicebot.server.core.util.TargetMaster . |
static int |
getTotalCategories()
Returns the number of categories presently loaded. |
static java.lang.String |
getWorkingDirectory()
Returns the working directory. |
static int |
incrementTotalCategories()
Increments the total categories. |
static void |
load(java.lang.String path,
java.lang.String botid)
Loads the Graphmaster with the contents of a given path. |
static void |
markReady()
Marks the end of loadtime. |
static Match |
match(java.lang.String input,
java.lang.String that,
java.lang.String topic,
java.lang.String botid)
Searches for a match in the Graphmaster to a given path. |
static int |
patternVocabularySize()
Returns the pattern vocabulary size. |
static void |
shutdown()
Tells the PredicateMaster to save all predicates. |
static void |
unload(java.lang.Object path,
Bot bot)
Removes all nodes associated with a given filename, and removes the file from the list of loaded files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] COPYRIGHT
public static final java.lang.String VERSION
public static final java.lang.String BUILD
public static final java.lang.String TEMPLATE
public static final java.lang.String THAT
public static final java.lang.String TOPIC
public static final java.lang.String BOTID
public static final java.lang.String FILENAME
public static final java.lang.String ASTERISK
*
wildcard.
public static final java.lang.String UNDERSCORE
_
wildcard.
public static final java.lang.String PATH_SEPARATOR
public static final java.lang.String ACTIVATIONS
protected static int RESPONSE_TIMEOUT
Method Detail |
---|
public static Nodemapper add(java.lang.String pattern, java.lang.String that, java.lang.String topic, java.lang.String botid)
Graphmaster
root.
pattern
- <pattern/> path componentthat
- <that/> path componenttopic
- <topic/> path componentbotid
-
Nodemapper
which is the result of adding the path.public static Match match(java.lang.String input, java.lang.String that, java.lang.String topic, java.lang.String botid) throws NoMatchException
Searches for a match in the Graphmaster
to a given path.
This is a high-level prototype, used for external access. It is not synchronized!
input
- <input/> path componentthat
- <that/> path componenttopic
- <topic/> path componentbotid
- <botid/> path component
Match
object
NoMatchException
- if no match was found#match(Nodemapper, Nodemapper, String, String, String, boolean, boolean, boolean)
public static void markReady()
Globals
,
displays various trace information on the console,
and writes startup information to the log..
public static void shutdown()
public static void activatedNode(Nodemapper nodemapper)
public static void checkpoint()
org.alicebot.server.core.util.TargetMaster
.
public static void load(java.lang.String path, java.lang.String botid)
Graphmaster
with the contents of a given path.
path
- path to the file(s) to loadbotid
- public static void unload(java.lang.Object path, Bot bot)
filename
- the filenamepublic static int getTotalCategories()
public static int incrementTotalCategories()
public static int patternVocabularySize()
public static java.lang.String getWorkingDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |