A command ranking criterion that measures a "problem" by a count of occurrences stored in a property of the CommandRanking object. For example, we could count the number of noun phrases that don't resolve to any objects.

On the first, coarse-grained pass, we measure only the presence or absence of our problem. That is, if one parse tree has zero occurrences of the problem and the other has a non-zero number of occurrences of the problem (as measured by our counting property), then we'll prefer the one with zero occurrences. If both have no occurrences, or both have a non-zero number of occurrences, we'll consider the two equivalent for the first pass, since we only care about the presence or absence of the problem.

On the second, fine-grained pass, we measure the actual number of occurrences of the problem, and choose the parse tree with the lower number.

class CommandRankingByProblem :   CommandRankingCriterion

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  

rankByActorSpecified  rankByAllExcluded  rankByDisambigOrdinals  rankByEmptyBut  rankByIndefinite  rankByInsufficient  rankByListForSingle  rankByMiscWordList  rankByMissing  rankByNonMatch  rankByUnwantedPlural  rankByVocabNonMatch 

Summary of Properties  


Summary of Methods  

comparePass1  comparePass2 



our ranking property - this is a property of the CommandRanking object that gives us a count of the number of times our "problem" has occurred in the ranking object's parse tree


comparePass1 (a, b)OVERRIDDENparser.t[5857]

first pass - compare by presence or absence of the problem

comparePass2 (a, b)OVERRIDDENparser.t[5875]
second pass - compare by number of occurrences of the problem

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