Modifier and Type | Field and Description |
---|---|
static int |
SLEEP |
static java.lang.String |
URL_PREFIX |
WORKER_THREADS
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Constructor and Description |
---|
Wikidata() |
Modifier and Type | Method and Description |
---|---|
void |
awake()
Start sensing.
|
Vertex |
define(Vertex source,
Vertex vertex)
Self API
Discover the meaning of the word including the filter.
|
Vertex |
define(Vertex source,
Vertex vertex,
Vertex vertex2)
Self API
Discover the meaning of the word only.
|
Vertex |
define(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Self API
Discover the meaning of the word only.
|
Vertex |
details(Vertex source,
Vertex vertex)
Self API
Discover the meaning of the word including all details.
|
Vertex |
details(Vertex source,
Vertex vertex,
Vertex vertex2)
Self API
Discover the meaning of the word including all details.
|
Vertex |
details(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Self API
Discover the meaning of the word including all details.
|
Vertex |
discover(boolean details,
boolean fork,
java.lang.String filter,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Self API
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex)
Self API
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex,
Vertex vertex2)
Self API
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Self API
Discover the meaning of the word.
|
java.util.List<java.lang.String> |
extractPropertyValueIds(net.sf.json.JSONObject data,
java.util.Map<java.lang.String,java.lang.String> propertyMap,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Extract the ids from the wikidata claims.
|
java.util.List<java.lang.Object> |
extractPropertyValues(java.lang.Object data,
java.util.Map<java.lang.String,java.lang.String> valueMap,
int cascade,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Extract the relevant data from the wikidata claims.
|
java.util.List<java.lang.String> |
extractText(java.lang.Object data)
Extract the language text from the JSON object.
|
Vertex |
fetchDescription(net.sf.json.JSONObject json,
int cascade,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Fetch only the name and description of the object.
|
void |
fetchDetails(Vertex object,
net.sf.json.JSONObject json,
int cascade,
java.util.Map<java.lang.String,Vertex> processed,
Network network) |
java.util.Map<java.lang.String,java.lang.String> |
fetchPropertyLabels(java.util.List<java.lang.String> properties,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Lookup the wikidata properites by id.
|
java.util.Set<java.lang.String> |
getExcludedProperties() |
void |
input(java.lang.Object input,
Network network)
Get and process the URL.
|
void |
output(Vertex output)
Post, process the post request.
|
Vertex |
processId(java.lang.String id,
int cascade,
boolean fork,
java.lang.String filter,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Lookup the wikidata item by id, and load its data.
|
net.sf.json.JSON |
processQuery(java.lang.String query)
Process the mql query and convert the result to a JSON object.
|
Vertex |
processSearch(java.lang.String keywords,
int cascade,
boolean fork,
java.lang.String filter,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Search for the best object describing the keywords.
|
Vertex |
search(Vertex source,
Vertex filter,
Vertex vertex)
Self API
Discover the meaning of the word including the filter.
|
Vertex |
search(Vertex source,
Vertex filter,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Self API
Discover the meaning of the word including the filter.
|
void |
setExcludedProperties(java.util.Set<java.lang.String> excludedProperties) |
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, 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, processRoot, 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, stripBrackets, toJSON, toXML
addListener, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, isEnabled, log, log, log, migrateProperties, notifyExceptionListeners, notifyResponseListener, printInput, removeListener, saveProperties, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, toString
public void awake()
BasicSense
awake
in interface Sense
awake
in class BasicSense
public void input(java.lang.Object input, Network network) throws java.lang.Exception
public Vertex processSearch(java.lang.String keywords, int cascade, boolean fork, java.lang.String filter, Network network, java.util.Map<java.lang.String,Vertex> processed)
public Vertex processId(java.lang.String id, int cascade, boolean fork, java.lang.String filter, Network network, java.util.Map<java.lang.String,Vertex> processed)
public java.util.Map<java.lang.String,java.lang.String> fetchPropertyLabels(java.util.List<java.lang.String> properties, Network network, java.util.Map<java.lang.String,Vertex> processed)
public java.util.List<java.lang.String> extractText(java.lang.Object data)
public java.util.List<java.lang.Object> extractPropertyValues(java.lang.Object data, java.util.Map<java.lang.String,java.lang.String> valueMap, int cascade, Network network, java.util.Map<java.lang.String,Vertex> processed)
public java.util.List<java.lang.String> extractPropertyValueIds(net.sf.json.JSONObject data, java.util.Map<java.lang.String,java.lang.String> propertyMap, Network network, java.util.Map<java.lang.String,Vertex> processed)
public Vertex fetchDescription(net.sf.json.JSONObject json, int cascade, Network network, java.util.Map<java.lang.String,Vertex> processed)
public void fetchDetails(Vertex object, net.sf.json.JSONObject json, int cascade, java.util.Map<java.lang.String,Vertex> processed, Network network)
public net.sf.json.JSON processQuery(java.lang.String query) throws java.io.IOException
java.io.IOException
public void output(Vertex output)
public Vertex search(Vertex source, Vertex filter, Vertex vertex)
public Vertex search(Vertex source, Vertex filter, Vertex vertex, Vertex vertex2, Vertex vertex3, Vertex vertex4, Vertex vertex5)
public Vertex define(Vertex source, Vertex vertex)
public Vertex define(Vertex source, Vertex vertex, Vertex vertex2)
public Vertex define(Vertex source, Vertex vertex, Vertex vertex2, Vertex vertex3, Vertex vertex4, Vertex vertex5)
public Vertex details(Vertex source, Vertex vertex)
public Vertex details(Vertex source, Vertex vertex, Vertex vertex2)
public Vertex details(Vertex source, Vertex vertex, Vertex vertex2, Vertex vertex3, Vertex vertex4, Vertex vertex5)
public Vertex discover(Vertex source, Vertex vertex)
public Vertex discover(Vertex source, Vertex vertex, Vertex vertex2)
public Vertex discover(Vertex source, Vertex vertex, Vertex vertex2, Vertex vertex3, Vertex vertex4, Vertex vertex5)
public Vertex discover(boolean details, boolean fork, java.lang.String filter, Vertex vertex, Vertex vertex2, Vertex vertex3, Vertex vertex4, Vertex vertex5)
public java.util.Set<java.lang.String> getExcludedProperties()
public void setExcludedProperties(java.util.Set<java.lang.String> excludedProperties)