rankByAmbiguity object | parser.t[6077]

Rank by ambiguous noun phrases. We apply this criterion on the second pass only, because it's a weak test: we might end up narrowing things down through automatic "logicalness" tests during the noun resolution process, so ambiguity at this stage in the parsing process doesn't necessarily indicate that there's real ambiguity in the command. However, if we can already tell that one interpretation is unambiguous and another is ambiguous, and the two interpretations are otherwise equally good, pick the one that's already unambiguous: the ambiguous interpretation might or might not stay ambiguous, but the unambiguous interpretation will definitely stay unambiguous.

`rankByAmbiguity : CommandRankingCriterion`

Superclass Tree (in declaration order)

`rankByAmbiguity`
`CommandRankingCriterion`
`object`

Summary of Properties

``

``

(none)

Summary of Methods

`comparePass2`

Inherited from `CommandRankingCriterion` :
`comparePass1`

Properties

(none)

Methods

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

Do nothing on the first pass, because we want any first-pass criterion to prevail over our weak test. Instead, check for a difference in ambiguity only on the second pass.

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