PsychiatryNLPKit.analysis.filler_words_count

PsychiatryNLPKit.analysis.filler_words_count(pos_tags, language, sections=None, averaging_method='macro')[source]

Count the number and ratio of filler words in the text data.

Notes:

Theoretical basis - Disfluencies are related to symptom severity in psychosis (Vail et al., 2018). Disfluencies are associated with PANSS negative scores and with PANSS P2 conceptual disorganization (Liebenthal et al., 2022).

Args:
pos_tags: Dict mapping section names to lists of POS-tagged sentences

(from TextData.pos_tags). Each sentence is a list of (word, lemma, tag) tuples; filler matching uses the lemma.

language: The language of the text. Must be one of “en” or “fr”. sections: Sections to process. None processes all sections in

pos_tags.

averaging_method: "macro" averages per-sentence filler ratios;

"micro" computes total fillers / total words across the section.

Returns:

Dict mapping section names to a metric dict with keys "filler_words_count" and "filler_words_ratio".

References:

Vail, A. K., Liebson, E., Baker, J. T., & Morency, L.-P. (2018). Toward objective, multifaceted characterization of psychotic disorders: Lexical, structural, and disfluency markers of spoken language. In Proceedings of the 20th ACM International Conference on Multimodal Interaction (pp. 170–178). Association for Computing Machinery. https://doi.org/10.1145/3242969.3243020 Liebenthal, E., Ennis, M., Rahimi-Eichi, H., Lin, E., Chung, Y., & Baker, J. T. (2022). Linguistic and non-linguistic markers of disorganization in psychotic illness. Schizophrenia Research, 259, 111–120. https://doi.org/10.1016/j.schres.2022.12.003