COMPLEXITY, Syntactic Complexity Ratio
Status: Current Last updated: 2026-05-22 09:47 EDT
Computes syntactic complexity by counting subordinating dependency relations in the %gra tier.
Usage
chatter-clan complexity file.cha
chatter-clan complexity corpus/ --speaker PAR
chatter-clan complexity file.cha --format json
What It Measures
COMPLEXITY reads the %gra dependency tier and counts clause-embedding relations that indicate syntactic subordination. The complexity ratio is the number of subordinating relations divided by total tokens (non-punctuation).
UD Relations (auto-detected)
Per crates/talkbank-clan/src/commands/complexity.rs:10:
| Relation | Description |
|---|---|
| CSUBJ | Clausal subject |
| CCOMP | Clausal complement |
| XCOMP | Open clausal complement |
| ACL | Adnominal clause |
| ADVCL | Adverbial clause modifier |
| APPOS | Apposition |
| EXPL | Expletive |
Legacy CLAN Relations (auto-detected)
| Relation | Description |
|---|---|
| CSUBJ | Clausal subject |
| COMP | Complement |
| CPRED | Clausal predicate |
| CPOBJ | Clausal object of preposition |
| COBJ | Clausal object |
| CJCT | Clausal adjunct |
| XJCT | Non-finite clausal adjunct |
| NJCT | Nominal adjunct |
| CMOD | Clausal modifier |
| XMOD | Non-finite clausal modifier |
Output
Per speaker:
- Count of each subordinating relation
- Tokens: total matched complexity relations
- TotalTokens: all non-PUNCT tokens
- Ratio: Tokens / TotalTokens
Requirements
Requires a %gra dependent tier. Utterances without %gra are skipped.
CLAN +-flag coverage audit
COMPLEXITY has no command-specific +-flags in CLAN’s
usage(), the entire flag surface is the inherited general
set, except that COMPLEXITY’s getflag() has special handling
for +s patterns containing bracket-prefixed postcodes
([+ ...] / [~+ ...] / [+ +...]).
Inherited general flags: same as FREQ. chatter’s Complexity clap struct uses the standard CommonAnalysisArgs. Audit summary: 6 Done / 1 Partial / 4 Rewriter only / 3 Missing.
Differences from CLAN
- Auto-detects UD vs legacy relation names (CLAN requires compile-time config)
- Uses typed AST
GraTierwithGrammaticalRelationentries - Supports JSON and CSV output
- Sub-relations (e.g.,
CSUBJ:pass) are properly matched to their base relation