Topic Resolver

class TopicResolver :   Resolver

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  


Summary of Properties  

isGlobalScope  qualifierResolver_  topicProd 

Inherited from Resolver :
action_  actor_  equivs_  isSubResolver  issuer_  scope_  whichMessageObject  whichObject 

Summary of Methods  

construct  filterAmbiguousNounPhrase  filterPluralPhrase  filterPossRank  getAll  getAllDefaults  getDefaultObject  getPossessiveResolver  getQualifierResolver  noMatch  noMatchPoss  noVocabMatch  objInPhysicalScope  objInScope  packageTopicList  resetResolver  resolveTopic  resolveUnknownNounPhrase 

Inherited from Resolver :
allowAll  cacheScopeList  filterAll  filterAmbiguousEquivalents  getAction  getPronounDefault  getRawPronounAntecedent  getReflexiveBinding  getScopeList  getTargetActor  matchName  resolvePronounAntecedent  selectIndefinite  withGlobals 



our scope is global, because we don't limit the scope to the physical senses

our qualifier resolver

the production match tree for the topic phrase we're resolving


construct (action, issuingActor, targetActor, prod, which, qualifierResolver)OVERRIDDENaction.t[6333]

no description available

filterAmbiguousNounPhrase (lst, requiredNum, np)OVERRIDDENaction.t[6459]
Filter an ambiguous noun list.

It is almost always undesirable from a user interface perspective to ask for help disambiguating a topic phrase. In the first place, since all topics tend to be in scope all the time, we might reveal too much about the inner model of the story if we were to enumerate all of the topic matches to a phrase. In the second place, topics are used in conversational contexts, so it almost never make sense for the parser to ask for clarification - the other member of the conversation might ask, but not the parser. So, we'll always filter the list to the required number, even if it means we choose arbitrarily.

As a first cut, we prefer objects that are physically in scope to those not in scope: if the player is standing next to a control panel and types "ask bob about control panel," it makes little sense to consider any other control panels in the simulation.

As a second cut, we'll ask the actor to filter the list. Games that keep track of the actor's knowledge can use this to filter according to topics the actor is likely to know about.

filterPluralPhrase (lst, np)OVERRIDDENaction.t[6503]
filter a plural

filterPossRank (lst, num)OVERRIDDENaction.t[6431]
Filter an ambiguous noun phrase list using the strength of possessive qualification, if any. For a topic phrase, we want to keep all of the possibilities.

getAll (np)OVERRIDDENaction.t[6527]
we don't allow ALL or provide defaults

getAllDefaults ( )OVERRIDDENaction.t[6528]
no description available

getDefaultObject (np)OVERRIDDENaction.t[6515]
get a default object

getPossessiveResolver ( )OVERRIDDENaction.t[6389]
no description available

getQualifierResolver ( )OVERRIDDENaction.t[6388]
get our qualifier resolver

noMatch (action, txt)action.t[6523]
no description available

noMatchPoss (action, txt)action.t[6524]
no description available

noVocabMatch (action, txt)action.t[6522]
it's fine not to match a topic phrase

objInPhysicalScope (obj)action.t[6417]
Determine if an object is in physical scope. We'll accept anything that's in physical scope, and we'll also accept any topic object that the actor knows about.

Note that this isn't part of the basic Resolver interface. It's instead provided as a service routine for our subclasses, so that they can easily determine the physical scope of an object if needed.

objInScope (obj)OVERRIDDENaction.t[6399]
Determine if the object is in scope. We consider any vocabulary match to be in scope for the purposes of a topic phrase, since the subject matter of topics is mere references to things, not the things themselves; we can, for example, ASK ABOUT things that aren't physically present, or even about completely abstract ideas.

packageTopicList (lst, match)action.t[6365]
package a resolved topic list - if it's not already represented as a ResolvedTopic object, we'll apply that wrapping

resetResolver ( )OVERRIDDENaction.t[6352]
remember the resolver for qualifier phrases

resolveTopic (lst, requiredNum, np)action.t[6478]
Resolve the topic phrase. This returns a ResolvedTopic object encapsulating the resolution of the phrase.

This default base class implementation simply creates a resolved topic list with the whole set of possible matches undifferentiated. Subclasses for specialized actions might want to differentiate the items in the list, based on things like the actor's knowledge so far or what's in physical scope.

resolveUnknownNounPhrase (tokList)OVERRIDDENaction.t[6489]
Resolve an unknown phrase. We allow unknown words to be used in topics; we simply return a ResolvedTopic that doesn't refer to any simulation objects at all.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3