PsychiatryNLPKit.analysis.propositional_idea_density
- PsychiatryNLPKit.analysis.propositional_idea_density(pos_tags, sections=None, lang='en')[source]
Propositional idea density per section (Hill et al., 2021).
Counts elementary predications (propositions) in text and reports their rate per 100 words. Following the Computerized Propositional Idea Density Rater (CPIDR) (Brown et al., 2008), propositions correspond roughly to verbs, adjectives, adverbs, prepositions, conjunctions, relative pronouns, and non-article determiners. Auxiliary “be”, “have”, and “do” fold into the following main verb, the copula contributes only when it predicates a noun phrase, and modal verbs count only through their negation.
- Notes:
Theoretical basis - Lower propositional idea density is associated with an increased risk of Alzheimer’s disease (Snowdon et al., 1996), and declines with age and in males (Hill et al., 2021).
- Args:
- pos_tags: Dict mapping section names to lists of POS-tagged sentences.
Each sentence is a list of
(word, lemma, tag)tuples.- sections: Sections to process.
Noneprocesses all sections in pos_tags.
- lang: Language code (“en” or “fr”). Determines the POS tag scheme
(Penn Treebank for English, Universal Dependencies for French).
- Returns:
Dict mapping section names to a metric dict with keys
"propositional_idea_density"(propositions per 100 words),"proposition_count"(total propositions), and"word_count"(total words, useful as a poverty-of-speech control). Empty sections receivefloat("nan")for all metrics.- References:
Brown, C., Snodgrass, T., Kemper, S. J., Herman, R., & Covington, M. A. (2008). Automatic measurement of propositional idea density from part-of-speech tagging. Behavior Research Methods, 40(2), 540–545. https://doi.org/10.3758/brm.40.2.540
Hill, E., Alty, J., Bartlett, L., Goldberg, L., Park, M., Yeom, S., & Vickers, J. (2021). Automated analysis of propositional idea density in older adults. Cortex, 145, 264–272. https://doi.org/10.1016/j.cortex.2021.09.018
Snowdon, D. A., Kemper, S. J., Mortimer, J. A., Greiner, L. H., Wekstein, D. R., & Markesbery, W. R. (1996). Linguistic ability in early life and cognitive function and Alzheimer’s disease in late life: Findings from the Nun Study. JAMA, 275(7), 528–532. https://doi.org/10.1001/jama.1996.03530270044029