PsychiatryNLPKit.analysis.adverb_ratio
- PsychiatryNLPKit.analysis.adverb_ratio(pos_tags, sections=None, lang='en', averaging_method='macro')[source]
Adverb-to-total-word ratio per section.
- Notes:
Theoretical basis - When used as part of a syntax complexity measure, adverb ratio is associated with negative clinical symptoms (Haas et al., 2020).
- Args:
pos_tags: Dict mapping section names to lists of POS-tagged sentences. sections: Sections to process.
Noneprocesses all sections inpos_tags.
lang: Language code (“en” or “fr”). averaging_method:
"macro"averages per-sentence ratios;"micro"computes total adverbs / total words across the section.
- Returns:
Dict mapping section names to a dict with keys
"adverb_ratio"and"adverb_count". Empty sections receivefloat("nan")for both.- References:
Haas, S. S., Doucet, G. E., Garg, S., Herrera, S. N., Sarac, C., Bilgrami, Z. R., Shaik, R. B., & Corcoran, C. M. (2020). Linking language features to clinical symptoms and multimodal imaging in individuals at clinical high risk for psychosis. European Psychiatry, 63(1), e72. https://doi.org/10.1192/j.eurpsy.2020.73