withHeadFloor

fun withHeadFloor(minTokens: Int = SHORT_QUESTION_MIN_TOKENS, headMinTokens: Int = DEFAULT_MIN_TOKENS, stopwords: Set<String> = Vocabulary.STOPWORDS, units: Map<String, MeasurementUnit> = Vocabulary.UNITS, maxTokens: Int? = null): SubstitutionGuard

This guard with a separate, higher floor for a difference in the first content word.

The shape M51's measurement pointed at. The floor's stated reason has always been the verb, and in a question the verb is at or near the head, so a floor on the head is the reason applied to the quantity it was about instead of to prompt length. Below headMinTokens content words a difference in the first position is treated as a synonym and the guard abstains; a difference anywhere else needs only minTokens.

At minTokens = 3, headMinTokens = 4 it costs the tuned split nothing, gains catches on both retired splits for no paraphrase at all, and on the external question split trades 65 catches for 36 paraphrases. That last figure is why MatchGuards.standard does not carry it: this project counts a paraphrase given up as a cost rather than as a rounding error, and the ratio is worse than one it has already declined. MatchGuards.shortQuestions is the chain that opts in, and docs/MEASUREMENTS.md publishes the trade on every split.

Throws