PsychiatryNLPKit.analysis.coordinating_conjunction_ratio

PsychiatryNLPKit.analysis.coordinating_conjunction_ratio(pos_tags, sections=None, lang='en', averaging_method='macro')[source]

Coordinating conjunction-to-total-word ratio per section.

Notes:

Theoretical basis - When used as part of a syntax complexity measure, coordinating conjunction 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. None processes all sections in

pos_tags.

lang: Language code (“en” or “fr”). averaging_method: "macro" averages per-sentence ratios; "micro"

computes total conjunctions / total words across the section.

Returns:

Dict mapping section names to a dict with keys "coordinating_conjunction_ratio" and "coordinating_conjunction_count". Empty sections receive float("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