PsychiatryNLPKit.analysis.pronoun_ratio
- PsychiatryNLPKit.analysis.pronoun_ratio(pos_tags, sections=None, lang='en', averaging_method='macro')[source]
Pronoun-to-total-word ratio per section.
- Notes:
Theoretical basis - High pronoun count predicts higher semantic similarity scores (He et al., 2024). Excessive pronoun use may reflect vague or deictic language patterns.
- 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 pronouns / total words across the section.
- Returns:
Dict mapping section names to a dict with keys
"pronoun_ratio"and"pronoun_count". Empty sections receivefloat("nan")for both.- References:
He, R., Palominos, C., Zhang, H., Alonso-Sánchez, M. F., Palaniyappan, L., & Hinzen, W. (2024). Navigating the semantic space: Unraveling the structure of meaning in psychosis using different computational language models. Psychiatry Research, 333, 115752. https://doi.org/10.1016/j.psychres.2024.115752