Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.95 KB

File metadata and controls

51 lines (34 loc) · 1.95 KB

Stylometric Metrics


A stylometric metric is any function

$$f : \mathcal{T} \rightarrow \mathbb{R}$$

that maps a text string to a real scalar capturing some surface property of writing style. VOICE treats each metric as a distribution over a corpus: given a set of texts, $f$ is applied to each one to produce a sample from the author's stylometric distribution for that feature.

Metrics are organised into four groups. Because metrics within the same group are highly correlated (they characterise the same underlying linguistic object from different angles), the evaluation suite averages within groups before aggregating across them, preventing any single dimension from dominating the alignment score through sheer metric count.

Implemented Metrics

Word Length Distribution

Moments of the per-word character length distribution.

Metric Description
avg_word_length Mean word length
std_word_length Standard deviation of word length
skew_word_length Skewness of word length
kurtosis_word_length Kurtosis of word length

Vocabulary Richness

Type–token and word statistics measuring lexical diversity.

Metric Description
type_token_ratio Unique tokens / total tokens
moving_avg_type_token_ratio TTR averaged over a sliding window (MATTR)
hapax_legomena_ratio Fraction of words appearing exactly once
dis_legomena_ratio Fraction of words appearing exactly twice
tri_legomena_ratio Fraction of words appearing exactly three times

Function Words

Metric Description
function_word_ratio Proportion of tokens drawn from a closed function-word list

Character N-gram Diversity

Type–token ratio and MATTR computed over character $n$-grams for $n \in {3, 4, 5}$.

Metric Description
char_{n}gram_type_token_ratio Character $n$-gram TTR
char_{n}gram_moving_avg_type_token_ratio Character $n$-gram MATTR