PsychiatryNLPKit.analysis.adjective_sentence_length
- PsychiatryNLPKit.analysis.adjective_sentence_length(syntax_trees, sections=None, lang='en')[source]
Average length of adjective phrases per section.
- Notes:
Theoretical basis - Adjective phrase length reflects descriptive elaboration and modification depth. Shorter adjective phrases may indicate reduced descriptive richness.
- Args:
- syntax_trees: Dict mapping section names to lists of constituency parse
trees.
- sections: Sections to process.
Noneprocesses all sections in syntax_trees.
- lang: Language code (“en” or “fr”), selecting the Penn Treebank
(
ADJP) or French Treebank (AP) adjective phrase label.
- Returns:
Dict mapping section names to a dict with key
"adjective_sentence_length". Sections without an adjective phrase receivefloat("nan").