public class Wiktionary extends Http implements DiscoverySense
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ERRORS |
static int |
MAX_WORDS |
WORKER_THREADS
conversations, 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, toXML
addListener, 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, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
discover
getBot, getLanguageState, getName, getPrimitive, initialize, input, input, isEnabled, notifyExceptionListeners, pool, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, shutdown
public void awake()
BasicSense
awake
in interface Sense
awake
in class BasicSense
public void migrateProperties()
migrateProperties
in interface Sense
migrateProperties
in class BasicSense
public void saveProperties()
saveProperties
in interface Sense
saveProperties
in class BasicSense
public 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 Http
public 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 Http
public 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