phontrast - Contrast and Separation Metrics for Phonological Categories
Computes and compares multiple measures of separation and
overlap between phonological categories (for example vowels or
consonants) in arbitrary multi-dimensional acoustic spaces such
as formant values, mel-frequency cepstral coefficients (MFCCs),
duration, or learned embeddings. The main entry point,
phontrast(), reports several contrast metrics in one call --
Jensen-Shannon divergence and distance (Lin, 1991)
<doi:10.1109/18.61115>, the Pillai-Bartlett trace,
Bhattacharyya distance and affinity, Mahalanobis distance, and
proportional overlap -- globally or by group on a common
separation-oriented scale, with bootstrap confidence intervals.
rank_contrasts() implements a measurement protocol for ranking
speakers' contrasts by Jensen-Shannon distance and checking the
ranking against Pillai, with sample-size licensing and a
bandwidth-sensitivity check. Also provides utilities for
preparing estimates for downstream modelling such as
generalized additive models and mixed-effects models. Formerly
released as 'phonJSD'.