public class Wiktionary extends Http implements DiscoverySense
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_ERRORS |
static int |
MAX_WORDS |
WORKER_THREADSconversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY| Constructor and Description |
|---|
Wiktionary() |
| Modifier and Type | Method and Description |
|---|---|
void |
awake()
Start sensing.
|
void |
copyDataRelationships(Vertex source,
Primitive type,
Vertex target,
Network network) |
Vertex |
define(Vertex source,
Vertex word)
Self API
Lookup the meaning of the word.
|
void |
discoverSentence(Vertex sentence,
Network network,
Vertex currentTime)
Attempt to discover information on the vertex.
|
Vertex |
importWord(java.lang.String word,
Network network)
Import the word from Wiktionary.
|
void |
migrateProperties()
Migrate to new properties system.
|
void |
output(Vertex output)
Post, process the post request.
|
void |
processCategory(java.util.List<java.lang.String> category,
org.w3c.dom.Node node,
java.net.URL url,
Network network)
Process Wiktionary category page.
|
void |
processRoot(org.w3c.dom.Node node,
java.net.URL url,
Network network)
Process the XHTML DOM.
|
void |
quickProcessWord(java.lang.String wordText,
java.util.List<java.lang.String> categoryText,
Network network)
Bypass loading the word's page, and just define it from the category info.
|
void |
saveProperties() |
java.lang.String |
stripBrackets(java.lang.String text) |
batchProcessURL, convertElement, convertElement, convertToJSON, convertToJSON, convertToMap, convertToXHTML, convertToXHTML, convertToXML, convertToXML, countJSON, delete, delete, disconnect, encode, findNextTag, findTag, findTag, findTag, getAllBullets, getAllURLBullets, getDomains, getHtmlCleaner, getNextBulletList, getNextNumberedList, getNextParagraph, getParser, getSentence, getText, input, input, nextNode, parseHTML, parseRSSFeed, parseURL, parseXHTML, parseXML, parseXMLURL, pool, postHTML, postHTML, postJSON, postJSON, postJSONAuth, postJSONAuth, postJSONAuth, postJSONAuth, postXML, postXML, postXML, postXML, postXMLAuth, postXMLAuth, postXMLAuth, postXMLAuth, printDate, processHeaders, putJSON, putJSON, requestCSV, requestCSV, requestHTML, requestHTML, requestHTML, requestHTML, requestJSON, requestJSON, requestJSON, requestJSON, requestJSONAuth, requestJSONAuth, requestJSONAuth, requestJSONAuth, requestText, requestText, requestText, requestXML, requestXML, requestXML, requestXML, requestXMLAuth, requestXMLAuth, requestXMLAuth, requestXMLAuth, rss, rssFeed, shutdown, toJSON, toXMLaddListener, checkEngaged, checkSentence, discover, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, isEnabled, log, log, log, notifyExceptionListeners, notifyResponseListener, printInput, removeListener, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdiscovergetBot, getLanguageState, getName, getPrimitive, initialize, input, input, isEnabled, notifyExceptionListeners, pool, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, shutdownpublic void awake()
BasicSenseawake in interface Senseawake in class BasicSensepublic void migrateProperties()
migrateProperties in interface SensemigrateProperties in class BasicSensepublic void saveProperties()
saveProperties in interface SensesaveProperties in class BasicSensepublic void processCategory(java.util.List<java.lang.String> category,
org.w3c.dom.Node node,
java.net.URL url,
Network network)
public void processRoot(org.w3c.dom.Node node,
java.net.URL url,
Network network)
processRoot in class Httppublic void quickProcessWord(java.lang.String wordText,
java.util.List<java.lang.String> categoryText,
Network network)
public void output(Vertex output)
public java.lang.String stripBrackets(java.lang.String text)
stripBrackets in class Httppublic void copyDataRelationships(Vertex source, Primitive type, Vertex target, Network network)
public Vertex importWord(java.lang.String word, Network network)
public Vertex define(Vertex source, Vertex word)
public void discoverSentence(Vertex sentence, Network network, Vertex currentTime)
discoverSentence in class BasicSense