PsychiatryNLPKit.analysis.syntax_depth
- PsychiatryNLPKit.analysis.syntax_depth(syntax_trees, sections=None)[source]
Average syntax tree height per section.
- Notes:
Theoretical basis - Reduced syntactic complexity predicts early schizophrenia onset (Morice & Ingram, 1983).
- Args:
- syntax_trees: Dict mapping section names to lists of constituency parse
trees.
- sections: Sections to process.
Noneprocesses all sections in syntax_trees.
- Returns:
Dict mapping section names to a dict with key
"syntax_depth". Empty sections receivefloat("nan").- References:
Morice, R. D., & Ingram, J. C. (1983). Language complexity and age of onset of schizophrenia. Psychiatry Research, 9(3), 233-242. https://doi.org/10.1016/0165-1781(83)90048-3