CommandRankingByProblem class | parser.t[5835]

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)

`CommandRankingByProblem`
`CommandRankingCriterion`
`object`

Subclass Tree

(none)

Global Objects

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

Summary of Properties

`prop_`

``

Summary of Methods

`comparePass1 comparePass2`

``

Properties

`prop_` | `parser.t[5841]`

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

Methods

`comparePass1 (a, b)`OVERRIDDEN | `parser.t[5844]`

first pass - compare by presence or absence of the problem

`comparePass2 (a, b)`OVERRIDDEN | `parser.t[5862]`

second pass - compare by number of occurrences of the problem

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2