code: TTR
biber_number: J43
xiao_number: O103
mfte_code: TTR
name: Type-token ratio
definition: >-
Ratio of distinct word types to total word tokens, calculated over first 400 words.
Measures lexical diversity.
normalization: words
detection:
- requires:
- word
description: Type-token ratio. Number of unique word types divided by total tokens. Not a pattern match.
sources:
- biber_1988
- mfte
- pybiber
- xiao_2009
notes: >-
MFTE calculates over first 400 words to control for text length.