Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IPSYN – Index of Productive Syntax

Status: Current Last updated: 2026-05-26 10:20 EDT

Purpose

Computes a syntactic complexity score by awarding points for distinct syntactic structures observed in a child’s utterances. Each structure type (rule) can earn at most 2 points – one per distinct utterance in which the structure appears. The total across all rules yields the IPSyn score.

See the CLAN manual for the original IPSYN command specification.

Usage

chatter-clan ipsyn file.cha
chatter-clan ipsyn --speaker CHI file.cha
chatter-clan ipsyn --rules ipsyn.rules file.cha
chatter-clan ipsyn --max-utterances 100 file.cha

Options (chatter-native)

OptionCLAN flagDescription
--speaker <CODE>+t*CHI (or +tCHI)Include speaker
--exclude-speaker <CODE>-t*CHI (or -tCHI)Exclude speaker
--rules <PATH>+lFCustom IPSYN rules file
--max-utterances <N>+cNMaximum utterances to analyze (default: 100)
--gem <LABEL>+g"label"Restrict to gem segment
--range <START-END>+z25-125Utterance range
--id-filter <PATTERN>+t@ID="..."Filter by @ID pattern
--include-retracings+r6Include retraced words in counting
--format <FMT>–Output format: clan (default), text, json, csv

CLAN +-flag coverage audit

Authoritative enumeration of every CLAN ipsyn flag. Sources:

  • OSX-CLAN/src/clan/ipsyn.cpp: usage().
  • OSX-CLAN/src/clan/cutt.cpp: mainusage() IPSYN branches.
  • crates/talkbank-clan/src/clan_args.rs: chatter’s rewriter.
  • crates/talkbank-cli/src/cli/args/clan_commands.rs::Ipsyn plus clan_common.rs::CommonAnalysisArgs.

(Status legend: same as FREQ.)

IPSYN is a required-flag refusal command in chatter, same refusal byte-parity as EVAL/KIDEVAL/DSS/SUGAR. The rules file is also required for non-default analysis.

IPSYN-specific +-flags (from ipsyn.cpp::usage)

CLAN flagMeaningChatterStatusNotes
+cNAnalyse N complete unique utterances (default 100)--max-utterances NDoneDirect mapping; rewriter routes +cN → --max-utterances N for IPSYN (since the per-subcommand routing batch).
+dDo not show file and line number where points are found,MissingPer OSX-CLAN/src/clan/ipsyn.cpp:3945, CLAN sets onlydata = atoi(getfarg(...)) + 1 (bounded by OnlydataLimit); +d → level 1. chatter has no --only-data flag. Per-IPSYN arm in clan_args.rs passes the token through so clap reports the literal +d argument rather than the misleading --display-mode rewrite.
+d1Output in spreadsheet format,MissingSame onlydata toggle as +d (CLAN: +d1 → level 2). chatter not implemented; passthrough arm.
+lFSpecify IPSYN rules file name F--rules <PATH>DoneDirect mapping; rewriter routes +lF → --rules F for IPSYN (since the per-subcommand routing batch).
+oUse the original rule set (100 utterances),Missing
-sSIgnore [+ ip] / [+ ipe] postcodespartial via --exclude-wordPartialDifferent semantic, chatter filters by word, CLAN’s IPSYN -sS skips postcoded utterances.

Audit summary

BucketCount
Done6
Partial3
Rewriter only2
Missing7

IPSYN’s two cleanest one-line follow-ups (rewriter routing of +cN → --max-utterances N and +lF → --rules F) landed together with the per-subcommand flag-routing batch (commit 9d34a10b).

Rule Categories

Rules are organized into four categories:

CategoryCodeDescriptionExample structures
Noun PhraseNNoun phrase complexityTwo-word NP, article+noun, possessive
Verb PhraseVVerb phrase complexityCopula, auxiliary, modal, infinitive
QuestionQQuestion formationYes/no, wh-question, tag question
SentenceSSentence structureConjoined, embedded, relative clause

The full English IPSyn has ~56 rules. The built-in default set provides a representative subset.

Algorithm

  1. For each utterance, serialize the %mor tier to text
  2. Match each rule pattern against the serialized %mor content
  3. For each rule, record the first two distinct utterances that match (max 2 points per rule)
  4. Sum all rule scores across categories
  5. Report total score and per-category subtotals

Scoring example

If rule N1 (“Two-word NP”) matches in utterances 3 and 7, it earns 2 points. If it only matches in utterance 3, it earns 1 point. If it never matches, 0 points.

Output

Per-speaker IPSyn total score with per-category subtotals (N, V, Q, S) and optional per-rule detail.

Differences from CLAN

Rule set

The built-in rule set is a simplified subset. For full 56-rule coverage, supply the official IPSYN rules file via --rules.

Pattern matching

Uses substring-based matching on the serialized %mor tier text rather than structured POS/morpheme matching. This produces equivalent results for most patterns but may differ for edge cases involving complex morphological structures.

Maximum utterances

Defaults to 100 (matching CLAN). Configurable via --max-utterances.

Output formats

Supports text, JSON, and CSV. CLAN produces text only.

Golden test parity

Verified against CLAN C binary output.