Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY |
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 |
---|
Freebase() |
Modifier and Type | Method and Description |
---|---|
void |
awake()
Start sensing.
|
Vertex |
define(Vertex source,
Vertex vertex)
Discover the meaning of the word including the filter.
|
Vertex |
define(Vertex source,
Vertex vertex,
Vertex vertex2)
Discover the meaning of the word only.
|
Vertex |
define(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Discover the meaning of the word only.
|
Vertex |
details(Vertex source,
Vertex vertex)
Discover the meaning of the word including all details.
|
Vertex |
details(Vertex source,
Vertex vertex,
Vertex vertex2)
Discover the meaning of the word including all details.
|
Vertex |
details(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
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)
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex)
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex,
Vertex vertex2)
Discover the meaning of the word.
|
Vertex |
discover(Vertex source,
Vertex vertex,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4,
Vertex vertex5)
Discover the meaning of the word.
|
void |
discoverSentence(Vertex sentence,
Network network,
Vertex currentTime)
Attempt to discover information on the sentence words.
|
java.lang.String |
extractDomain(java.lang.String key)
Extract the domain from the property.
|
java.util.List<java.lang.Object> |
extractPropertyValues(java.lang.Object data,
java.util.List<java.lang.String> filters,
int cascade,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Extract the relevant data from the Freebase property.
|
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.List<java.lang.String> |
getTypeFilters() |
void |
input(java.lang.Object input,
Network network)
Get and process the URL.
|
void |
output(Vertex output)
Post, process the post request.
|
Vertex |
processCompoundRelationship(net.sf.json.JSONObject json,
int cascade,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Process the compound relationship.
|
Vertex |
processId(java.lang.String id,
int cascade,
boolean fork,
java.lang.String filter,
Network network,
java.util.Map<java.lang.String,Vertex> processed)
Process the object for the Freebase id.
|
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.
|
java.lang.String |
replaceKey(java.lang.String string) |
Vertex |
search(Vertex source,
Vertex filter,
Vertex vertex)
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)
Discover the meaning of the word including the filter.
|
void |
setTypeFilters(java.util.List<java.lang.String> typeFilters) |
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, 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 static java.lang.String URL_PREFIX
public static int SLEEP
public static java.lang.String KEY
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 java.lang.String replaceKey(java.lang.String string)
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 Vertex processCompoundRelationship(net.sf.json.JSONObject json, int cascade, Network network, java.util.Map<java.lang.String,Vertex> processed)
public java.lang.String extractDomain(java.lang.String key)
public java.util.List<java.lang.Object> extractPropertyValues(java.lang.Object data, java.util.List<java.lang.String> filters, int cascade, 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 void discoverSentence(Vertex sentence, Network network, Vertex currentTime)
discoverSentence
in class BasicSense
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.List<java.lang.String> getTypeFilters()
public void setTypeFilters(java.util.List<java.lang.String> typeFilters)