ELAN2CHAT – ELAN XML to CHAT Conversion
Status: Current Last updated: 2026-05-22 13:40 EDT
Purpose
Converts ELAN annotation files (.eaf) into CHAT format. ELAN uses a time-aligned annotation format stored as XML, with time slots referenced by alignable annotations within tiers.
Usage
chatter-clan elan2chat input.eaf
Options
| Option | Default | Description |
|---|---|---|
-l, --language | "eng" | ISO 639 language code for the @Languages header |
-o, --output | stdout | Output CHAT file path |
The corpus name in @ID headers is hardcoded to "elan_corpus"
(crates/talkbank-clan/src/converters/elan2chat.rs:230); there is
no CLI flag to override it.
Conversion Details
- ELAN tier IDs are mapped to CHAT speaker codes (first 3 characters, uppercased)
- Time slots are resolved to millisecond timing bullets
- Annotations are merged across tiers and sorted by start time
- All speakers are assigned the
Unidentifiedparticipant role
Input Format
ELAN XML (.eaf) files containing <TIER> elements with <ALIGNABLE_ANNOTATION> entries referencing <TIME_SLOT> elements for timing.
Output
A well-formed CHAT file with @UTF8, @Begin/@End headers, @Languages, @Participants, and @ID headers for each discovered speaker. Each ELAN annotation becomes a timed utterance.
Implementation Note
Uses simple string-based XML parsing to avoid adding a quick-xml dependency. Sufficient for well-formed ELAN files.
Differences from CLAN
- Uses typed AST for CHAT generation
- Produces valid, well-formed CHAT output
Reference
See the CLAN manual for the original ELAN2CHAT command documentation.
CLAN +-flag coverage audit
ELAN2CHAT is a converter: input ELAN .eaf XML, output CHAT.
Sources: OSX-CLAN/src/clan/Elan2Chat.cpp::usage,
crates/talkbank-clan/src/converters/elan2chat.rs.
ELAN2CHAT-specific +-flags (from Elan2Chat.cpp::usage)
| CLAN flag | Meaning | Chatter | Status |
|---|---|---|---|
+a | Output tiers as found in .eaf (default: sort by utterance delimiter) | , | Missing |
+b | Multiple bullets per line (default: one per line) | , | Missing |
Audit summary: 1 Done (default conversion), 2 Missing. Both gaps are output-shape policy switches; chatter’s default follows CLAN’s default in both cases.