Companion

object Companion

Properties

Link copied to clipboard
const val DEFAULT_MIN_TOKENS: Int = 4

Content words needed on both sides before a single difference is treated as a swap.

Link copied to clipboard
const val LONG_PROMPT_MAX_TOKENS: Int = 12

The bound MatchGuards.longPrompts sets: past this many content words, one differing word is not evidence of a substitution.

Link copied to clipboard

The floor withHeadFloor uses off the head: two agreeing content words in order.

Functions

Link copied to clipboard
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.