DisambigResolverclass
disambig.t[343], en_us.t[3435]
Disambiguation Resolver. This is a special resolver that we use for resolving disambiguation responses.
Modified in
en_us.t[3435]:
Custom disambiguation resolver.
class
DisambigResolver
:
InteractiveResolver
Superclass Tree (in declaration order)
DisambigResolver
InteractiveResolver
ProxyResolver
` object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
allowAll
distinguisher
fullMatchList
matchList
matchText
ordinalMatchList
Summary of Methods
construct
filterAmbiguousNounPhrase
filterPluralPhrase
getAll
getQualifierResolver
matchName
objInScope
resolvePronounAntecedent
selectIndefinite
Inherited from InteractiveResolver
:
getReflexiveBinding
resolvePronounAsTargetActor
Inherited from ProxyResolver
:
getPossessiveResolver
propNotDefined
Properties
allowAll
we allow ALL in interactive disambiguation responses, regardless of the verb, because we’re just selecting from the list presented in the prompt in these cases
distinguisher
The distinguisher that was used to generate the prompt. Some distinguishers can tell objects apart by other characteristics than just their names, so when parsing we want to be able to give the distinguisher a look at the input to see if the player is referring to one of the distinguishing characteristics rather than the object’s own name.
fullMatchList
the full original match list, which might include items in scope beyond those offered as interactive choices
matchList
the original match list we are disambiguating, which includes all of the objects offered as interactive choices, and might include indistinguishable equivalents of offered items
matchText
the text of the phrase we’re disambiguating
ordinalMatchList
The “ordinal” match list: this includes the exact list offered as interactive choices in the same order as they were shown in the prompt. This list can be used to correlate ordinal responses to the prompt list, since it contains exactly the items listed in the prompt. Note that this list will only contain one of each indistinguishable object.
Methods
construct (matchText, ordinalMatchList, matchList, fullMatchList, resolver, dist)
OVERRIDDEN
no description available
filterAmbiguousNounPhrase (lst, requiredNum, np)
filter an ambiguous noun list
filterPluralPhrase (lst, np)
filter a plural noun list
getAll (np)
for ‘all’, use the full current full match list
getQualifierResolver ( )
Resolve qualifiers in the enclosing main scope, since qualifier phrases in responses are not part of the narrowed list being disambiguated.
matchName (obj, origTokens, adjustedTokens)
Match an object’s name. We’ll send this to the distinguisher for handling.
objInScope (obj)
Determine if an object is in scope. We pass this to the distinguisher to decide.
resolvePronounAntecedent (typ, np, results, poss)
OVERRIDDEN
Perform special resolution on pronouns used in interactive responses. If the pronoun is HIM or HER, then look through the list of possible matches for a matching gendered object, and use it as the result if we find one. If we find more than one, then use the default handling instead, treating the pronoun as referring back to the simple antecedent previously set.
selectIndefinite (results, lst, requiredNumber)
Select the match for an indefinite noun phrase. In interactive disambiguation, an indefinite noun phrase simply narrows the list, rather than selecting any match, so treat this as still ambiguous.
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3