DisambigRankingclass
Disambiguation Ranking. This is a special version of the command ranker that we use to rank the intepretations of a disambiguation response.
class
DisambigRanking
:
CommandRanking
Superclass Tree (in declaration order)
DisambigRanking
CommandRanking
ResolveResults
` object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
disambigOrdinalCount
nounSlotCount
rankingCriteria
Inherited from CommandRanking
:
actorSpecifiedCount
allExcludedCount
allowActionRemapping
ambigCount
commandCount
emptyButCount
endAdjCount
indefiniteCount
inSingleObjSlot
insufficientCount
inTopicSlot
listForSingle
literalLength
match
miscWordListCount
missingCount
nonMatchCount
nonMatchPossCount
pluralTruncCount
pronounCount
tokCount
truncCount
unknownWordCount
unwantedPluralCount
vocabNonMatchCount
weaknessLevel
Summary of Methods
noteDisambigOrdinal
noteOrdinalOutOfRange
Inherited from CommandRanking
:
allNotAllowed
ambiguousNounPhrase
askMissingObject
beginSingleObjSlot
beginTopicSlot
calcRanking
compareRanking
construct
emptyNounPhrase
endSingleObjSlot
endTopicSlot
getImpliedObject
incCommandCount
insufficientQuantity
noMatch
noMatchForAll
noMatchForAllBut
noMatchForListBut
noMatchForLocation
noMatchForPossessive
noMatchForPronoun
noMatchPossessive
noteActorSpecified
noteAdjEnding
noteBadPrep
noteEmptyBut
noteIndefinite
noteLiteral
noteMatches
noteMiscWordList
noteNounSlots
notePlural
notePronoun
noteWeakPhrasing
nothingInLocation
noVocabMatch
reflexiveNotAllowed
singleObjectRequired
sortByRanking
uniqueObjectRequired
unknownNounPhrase
wrongReflexive
zeroQuantity
Properties
disambigOrdinalCount
number of list ordinals in the match
nounSlotCount
OVERRIDDEN
disambiguation commands have no verbs, so there’s no verb structure to rank; so just use an arbitrary noun slot count
rankingCriteria
OVERRIDDEN
Add the ordinal count ranking criterion at the end of the inherited list of ranking criteria. If we can’t find any differences on the basis of the other criteria, choose the interpretation that uses fewer ordinal phrases. (We prefer an non-ordinal interpretation, because this will prefer matches to explicit vocabulary for objects over matches for generic ordinals.)
Insert the ‘ordinal’ rule just before the ‘indefinite’ rule - avoiding an ordinal match is more important.
Methods
noteDisambigOrdinal ( )
note a list ordinal (i.e., “the first one” to refer to the first item in the ambiguous list) - we take list ordinals as less desirable than treating ordinal words as adjectives or nouns
noteOrdinalOutOfRange (ord)
note the an ordinal response is out of range
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3