|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthyspirit.engines.HyEngine
hyspirit.engines.HyInferenceEngine
hyspirit.engines.HyPOOLEngine
public class HyPOOLEngine
A POOL engine runs POOL (probabilistic object-oriented logic) programs. For example:
database1[
doc1.author(peter)
0.9 doc1 [ 0.2 sailing; 0.5 sailor(peter); peter.friend(mary) ]
0.5 doc2 [ 0.8 sec1[sailing]; 0.3 sec2[boats] ]
]
The program above models a database with two documents (doc1, doc2), and the content and structure of the documents are modelled with the same logical componends; for the content representation, words, classifications, and relationships are applied.
The document content augments the knowledge of the context in which the documents occur. For example, we view doc1 as more reliable then doc2, and sec1 contributes more to the description of doc2, than sec2 does.
Querying is as follows:
% Content-oriented querying:
% All documents about sailing:
?- D[ sailing ];
% Fact-oriented querying:
% All document of author peter:
?- D.author(peter);
% Integrated content and fact-oriented querying:
% All documents about sailing and a sailor, where the sailor
% is the author of that document.
?- D[sailing & sailor(X)] & D.author(X);
POOL is described in Thomas Roelleke, "POOL: A probabilistic object-oriented logic for hypermedia retrieval", Shaker Verlag, Aachen, 1999.
| Field Summary |
|---|
| Fields inherited from class hyspirit.engines.HyInferenceEngine |
|---|
deleteQueryProgram, retrieveProgram |
| Fields inherited from class hyspirit.engines.HyEngine |
|---|
argumentString, LOG, stdin, TIME_PREFIX |
| Constructor Summary | |
|---|---|
HyPOOLEngine()
This constructor must be used if you are going to start your own engine process (client/server mode). |
|
HyPOOLEngine(HySpiritProperties hyspirit)
This constructor must be used if you are going to start your own engine process (client/server mode). |
|
HyPOOLEngine(java.lang.String hostname,
int port)
This constructor must be used if you use an engine server (client mode). |
|
| Method Summary | |
|---|---|
protected java.lang.String[] |
buildCommand()
Builds the command from the parameters. |
void |
reset()
Resets all parameters of the engine after destroying a possibly running process. |
| Methods inherited from class hyspirit.engines.HyInferenceEngine |
|---|
deleteQuery, deleteQueryProgram, echo, echoSpecial, eval, evalFile, getStreamEndMessage, nextTuple, retrieve, retrieveProgram, runProgram |
| Methods inherited from class hyspirit.engines.HyEngine |
|---|
closeSTDIN, destroy, exitValue, getCommand, getEngineName, getInputReader, getOutputWriter, getPercentageCPU, getRealTime, getSTDERR, getSTDIN, getSTDOUT, getSysTime, getUserTime, hasNext, isInClientMode, isRunning, kb, kb, kb, next, readFromSTDIN, restart, run, send, send, sendAndReceive, sendFile, setArgumentString, setLogger, start, suppressSTDERR, takesTime, takeTime, waitFor, waitTillRunning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HyPOOLEngine()
throws HySpiritException
HySpiritException - if we can't determine the environment
public HyPOOLEngine(HySpiritProperties hyspirit)
throws HySpiritException
hyspirit - the HySpirit properties containing the environment
HySpiritException - if we can't determine the environment
public HyPOOLEngine(java.lang.String hostname,
int port)
throws HySpiritException
hostname - the server host nameport - the server port
HySpiritException - if we can't determine the environment| Method Detail |
|---|
public void reset()
run().
reset in class HyEngineprotected java.lang.String[] buildCommand()
HyEnginebuildCommand and
reset methods. Be sure that you place the support for new,
additional parameters somewhere. This means the block
if (this.argumentString != null) {
StringTokenizer strTok= new StringTokenizer(this.argumentString);
while (strTok.hasMoreTokens()) commandVec.add(strTok.nextToken());
}
should appear somewhere in your buildCommand
implementation.
The output of this method is used in the run() method.
buildCommand in class HyEngine
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||