ResolutionErrorclass
Noun phrase resolution error. This is a special type of parsing error that indicates that the problem is with resolving a noun phrase to game-world objects.
class
ResolutionError
:
ParseError
Superclass Tree (in declaration order)
ResolutionError
ParseError
Exception
` object`
Subclass Tree
ResolutionError
ActorResolutionError
InsufficientNounsError
NoneInLocationError
NoneInOwnerError
NoneWithContentsError
UnmatchedNounError
AmbiguousMultiDefiniteError
AmbiguousError
OrdinalRangeError
PronounError
AntecedentScopeError
NoAntecedentError
UnmatchedActorError
Global Objects
(none)
Summary of Properties
Inherited from ParseError
:
allowOnRespell
curable
errStage
Inherited from Exception
:
errmsg_
Summary of Methods
Inherited from ParseError
:
display
tryCuring
Inherited from Exception
:
displayException
getExceptionMessage
showStackTrace
Properties
np
the NounPhrase object for the errant phrase, if available
txt
the text of the errant phrase, if available
Methods
construct (np)
OVERRIDDEN
no description available
rankCorrection (toks, idx, dict)
OVERRIDDEN
For a noun resolution error, our best bet for a spelling correction would be a word associated with a game-world object. Only consider in-scope objects when making the correction, to avoid spurious corrections that give away information on objects the player has yet to encounter. We’ll also allow words that are used in non-predicate grammar productions, since we might have a structural noun phrase word (an article, pronoun, etc).
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1