PsychiatryNLPKit.analysis.unique_pos_tags

PsychiatryNLPKit.analysis.unique_pos_tags(pos_tags, sections=None)[source]

Average number of unique POS tags per sentence per section.

Notes:

Theoretical basis - POS tag diversity reflects lexical variety and grammatical complexity in speech. Reduced diversity may indicate impoverished thought content.

Args:

pos_tags: Dict mapping section names to lists of POS-tagged sentences. sections: Sections to process. None processes all sections in

pos_tags.

Returns:

Dict mapping section names to a dict with key "unique_pos_tags". Empty sections receive float("nan").