Package edu.tufts.hrilab.interfaces
Interface ConsultantInterface
- All Known Subinterfaces:
VisionConsultantInterface
- All Known Implementing Classes:
ABBAreaConsultant,ABBLocationConsultant,AITVisionConsultant,CognexConsultant,Consultant,ContextConsultant,DialogueConsultant,ItemConsultant,MockVisionConsultant,PoseConsultant,RWSPoseConsultant,SpotNavGraphLocationConsultant,TemiV3PoseConsultant,VisionConsultant
public interface ConsultantInterface
ConsultantInterface is the base set of methods for reference resolution (i.e., POWER) in DIARC.
-
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)
-
Method Details
-
getKBName
String getKBName()Returns name of things handles by this consultant (e.g., "objects", "locations", etc).- Returns:
- knowledge base name
-
getPropertiesHandled
Returns a list of Properties handled by this component.- Returns:
- list of Properties.
-
getInitialDomain
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).- Parameters:
query- properties to optionally do some pre-processing- Returns:
- list of currently known ids
-
process
Returns 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?
- Parameters:
constraint- Property to checkbindings- Map of free variables to refIds- Returns:
- probability value [0.0. 1.0]
-
createReferences
new representations are created for each free-variable and returned in the binding list.- Parameters:
vars- list of free-variables- Returns:
- list of bindings
-
assertProperties
an attempt is made to bring the knowledge base in line with the provided bindings, list of properties, and probability value.- 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?
-
getActivatedEntities
Get a list of currently highly salient entities that should be considered "activated."- Returns:
- list of refIds and probability pairs
-
getAssertedProperties
Get the list of properties that have been asserted for a given refId.- Parameters:
refId- reference resolution id- Returns:
- list of Properties
-
assertProperties
Add properties to already existing object ref. Each property should contain a connection to the existing reference either by refId or refId's variable.- Parameters:
refId- referenceproperties- reference properties- Returns:
- if property was successfully added to reference refId
-
convertToType
Convert 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.- Type Parameters:
U- target Java class template type (any)- Parameters:
refId- - reference resolution ID (e.g.object_3)type- - target Java class type- Returns:
- instance of specified target Java class
-
convertToType
Convert 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.- Type Parameters:
U- target Java class template type (any)- Parameters:
refId- - reference resolution ID (e.g.object_3)type- - target Java class typeconstraints- first-order-logic predicate constraints- Returns:
- instance of specified target Java class
-
registerForNewPropertyNotification
void registerForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback) -
unregisterForNewPropertyNotification
void unregisterForNewPropertyNotification(ai.thinkingrobots.trade.TRADEServiceInfo callback) -
notifyNewPropertySubscribers
void notifyNewPropertySubscribers()
-