|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.senterre.lloyd.Lloyd
Lloyd is an object that can learn and an answer sentences. L.L.O.Y.D. (Learn Language Out Of Your Dialogs).
| Constructor Summary | |
Lloyd()
Class constructor. |
|
Lloyd(int intelligibleLevel)
Class constructor specifying the intelligble level. |
|
| Method Summary | |
void |
addDocument(java.lang.String uri)
Method to add a whole document to the Lloyd's brain. |
void |
addSentence(java.lang.String string)
Method used to train Lloyd by feeding it with sentence(s). |
java.lang.String |
getSentence()
This method returns a completly random sentence. |
java.lang.String |
getSentence(java.lang.String word)
This method tries to return a sentence containing the "word" |
java.lang.String |
getSentence(java.lang.String[] words)
Return a random sentence by determining which word may be the most significant from the given sentence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Lloyd()
public Lloyd(int intelligibleLevel)
intelligibleLevel - This is an integer value ranging from 1 to 4. 1 is the least intelligible, and 4 is the more intelligble.| Method Detail |
public java.lang.String getSentence()
public java.lang.String getSentence(java.lang.String word)
public java.lang.String getSentence(java.lang.String[] words)
words - An array of words. Usually it's a sentence splitted in words.
public void addSentence(java.lang.String string)
string - This is the string to feed LLoyd. It may contains more than one sentence it'll split it.public void addDocument(java.lang.String uri)
uri - Any URI to a readable document. Avoid HTML pages, only TEXT pages. You can also use local files like file:c:/toto.txt
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||