Package edu.tufts.hrilab.slug.dialogue
Class DialogueConsultant
java.lang.Object
edu.tufts.hrilab.slug.dialogue.DialogueConsultant
- All Implemented Interfaces:
ConsultantInterface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanassertProperties(Symbol refId, List<Term> properties) Add properties to already existing object ref.booleanan attempt is made to bring the knowledge base in line with the provided bindings, list of properties, and probability value.<U> UconvertToType(Symbol refId, Class<U> type) Convert refId to target class.<U> UconvertToType(Symbol refId, Class<U> type, List<? extends Term> constraints) Convert refId to target class using the specified constraints for to filter the results.createReferences(List<Variable> vars) new representations are created for each free-variable and returned in the binding list.Get a list of currently highly salient entities that should be considered "activated."getAssertedProperties(Symbol refId) Get the list of properties that have been asserted for a given refId.getInitialDomain(List<Term> query) Returns a list of currently known refIds (it takes a seq of Properties, to optionally do some pre-processing to return a list of relevant candidates).Returns name of things handles by this consultant (e.g., "objects", "locations", etc).Returns a list of Properties handled by this component.voidReturns the probability that a property (aka constraint) holds for an entity (specified by a map of free-variable to refId bindings).voidregisterForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback) voidunregisterForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback)
-
Field Details
-
log
protected final org.slf4j.Logger log -
diaLog
-
-
Constructor Details
-
DialogueConsultant
-
-
Method Details
-
getActivatedEntities
Description copied from interface:ConsultantInterfaceGet a list of currently highly salient entities that should be considered "activated."- Specified by:
getActivatedEntitiesin interfaceConsultantInterface- Returns:
- list of refIds and probability pairs
-
getKBName
Description copied from interface:ConsultantInterfaceReturns name of things handles by this consultant (e.g., "objects", "locations", etc).- Specified by:
getKBNamein interfaceConsultantInterface- Returns:
- knowledge base name
-
getPropertiesHandled
Description copied from interface:ConsultantInterfaceReturns a list of Properties handled by this component.- Specified by:
getPropertiesHandledin interfaceConsultantInterface- Returns:
- list of Properties.
-
getInitialDomain
Description copied from interface:ConsultantInterfaceReturns a list of currently known refIds (it takes a seq of Properties, to optionally do some pre-processing to return a list of relevant candidates).- Specified by:
getInitialDomainin interfaceConsultantInterface- Returns:
- list of currently known ids
-
process
Description copied from interface:ConsultantInterfaceReturns the probability that a property (aka constraint) holds for an entity (specified by a map of free-variable to refId bindings).TODO: rename method to something more descriptive. how about getProbability or checkProperty?
- Specified by:
processin interfaceConsultantInterface- Parameters:
constraint- Property to checkbindings- Map of free variables to refIds- Returns:
- probability value [0.0. 1.0]
-
createReferences
Description copied from interface:ConsultantInterfacenew representations are created for each free-variable and returned in the binding list.- Specified by:
createReferencesin interfaceConsultantInterface- Parameters:
vars- list of free-variables- Returns:
- list of bindings
-
assertProperties
Description copied from interface:ConsultantInterfacean attempt is made to bring the knowledge base in line with the provided bindings, list of properties, and probability value.- Specified by:
assertPropertiesin interfaceConsultantInterface- Parameters:
bindings- list of bindings in tuple form (free-variable and refId pair)prob- probability valueproperties- list of Properties- Returns:
- whether the updated was successful?
-
getAssertedProperties
Description copied from interface:ConsultantInterfaceGet the list of properties that have been asserted for a given refId.- Specified by:
getAssertedPropertiesin interfaceConsultantInterface- Parameters:
refId- reference resolution id- Returns:
- list of Properties
-
assertProperties
Description copied from interface:ConsultantInterfaceAdd properties to already existing object ref. Each property should contain a connection to the existing ref either by refId or refId's variable.- Specified by:
assertPropertiesin interfaceConsultantInterface- Returns:
-
convertToType
Description copied from interface:ConsultantInterfaceConvert refId to target class. This is a way to map references onto Java-types. If it's not possible for a refId to be converted to the specified type, null is returned.- Specified by:
convertToTypein interfaceConsultantInterface- Parameters:
refId- - reference resolution ID (e.g.object_3)type- - target Java class type- Returns:
-
convertToType
Description copied from interface:ConsultantInterfaceConvert refId to target class using the specified constraints for to filter the results. This is a way to map references onto Java-types. If it's not possible for a refId to be converted to the specified type, null is returned.- Specified by:
convertToTypein interfaceConsultantInterface- Returns:
-
registerForNewPropertyNotification
public void registerForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback) - Specified by:
registerForNewPropertyNotificationin interfaceConsultantInterface
-
unregisterForNewPropertyNotification
public void unregisterForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback) - Specified by:
unregisterForNewPropertyNotificationin interfaceConsultantInterface
-
notifyNewPropertySubscribers
public void notifyNewPropertySubscribers()- Specified by:
notifyNewPropertySubscribersin interfaceConsultantInterface
-