Skip to content Aller au contenu

Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lexicon.low-lexical-diversity

What it flags

Passages with excessive repetition of content words. A monotonous text loses reader attention and often signals unstructured thinking. The rule is not an anti-jargon detector: technical terms (API, request, cache) are expected to repeat โ€” the signal targets non-technical content words.

At a glance

Categorylexicon
Default severityinfo
Default weight1
LanguagesEN ยท FR (separate stoplists)
Sourcesrc/rules/low_lexical_diversity.rs

Detection

Sliding window of window_size words. Within the window, compute unique_words / total_words over non-stopword, non-code-block tokens. Fire when the ratio falls below min_ratio.

Parameters

KeyTypedev-docpublicfalc
window_sizeint10010080
min_ratiofloat0.400.500.55
use_stoplistbooltruetruetrue

Suppression

See Suppressing diagnostics.

References

See References for the full bibliography.