talk-tag
talk-tag is a tool for automatic morphosyntactic error annotation in transcribed speech.
It adds inline CHAT-compatible error tags to utterances, helping researchers and annotators pre-annotate transcripts for review. The current system follows a subset of the CHAT word-level error coding scheme described in Tools for Analyzing Talk, Part 1: The CHAT Transcription Format (Chapter 18.1).
What It Annotates
TalkTag currently annotates:
- morphological errors:
[* m:*] - substitution errors (subset of semantic errors in the manual):
[* s:r:*]and[* s:r:gc:*]
It also inserts target reconstructions inline, following CHAT conventions:
[: target]when the produced form is a non-word[= target]when the produced form is a real word but the intended target should still be recorded
For the current package behavior:
- non-word reconstructions such as
[: went]are preserved - real-word reconstructions are converted to
[= target] [= target]output is hidden by default and included only when--show-targetis set
This is intentional: according to the CHAT manual, [= target] is not required
for analysis in the way [: target] is, so TalkTag keeps it optional and
defaults to the cleaner output.
The underlying model was trained before the current manual standardized the
real-word target notation as [= target]. Because of that, raw generations may
still reflect the older [:: target] convention. TalkTag rewrites those cases
to [= target] in post-processing before saving output.
The CHAT manual distinguishes these because [: target] lets MOR use "the real
word target" for parsing, whereas the real-word replacement notation lets MOR
use "the actual word produced" while still preserving the target for other CLAN
analyses. See the CHAT
manual and the CLAN
manual.
Quick Examples
Yesterday I walk [= walked] [* m:0ed] to school .
Yesterday I goed [: went] [* m:=ed] to school .
Yesterday me [= I] [* s:r:gc:pro] walked to school .
Yesterday I went in [= to] [* s:r:prep] school .
See the CHAT Transcription Guidelines.
Annotation Scheme
Morphological Labels
CHAT error tags are compositional: each part of a tag indicates, from general to fine-grained the error and its underline process.
For example, in [* m:0ed], m marks a morphosyntactic error, 0 marks a missing form, and ed marks past morpheme.
| Level 1 | Meaning |
|---|---|
* m: |
morphosyntactic error |
| Level 2 | Meaning |
0 |
missing regular form |
= |
over-regularisation |
+ |
superfluous marking |
++ |
double marking |
base: |
base for irregular form |
irr: |
irregular for base form |
sub: |
past/perfective substitution |
allo |
allomorphic errors |
vsg: |
irregular verb 3SG |
vun: |
irregular verb unmarked |
| Level 3 | Meaning |
mor |
target morpheme |
a |
agreement error |
i |
irregular target |
Common level-3 morphemes include:
ed, en, 3s, ing, s, 's, er, and est.
In practice, common outputs include:
[* m:0ed]for missing past tense[* m:=ed]for over-regularised past forms[* m:03s:a]for missing 3SG agreement marking
Substitution Labels
| Level 1 | Meaning |
|---|---|
* s: |
substitution error |
| Level 2 | Meaning |
r: |
related lexical substitution |
r:gc: |
related grammatical substitution |
| Level 3 | Meaning |
POS |
target part of speech |
Supported part-of-speech (POS) in the paper include:
pro(pronoun), det (determiner), and prep (preposition).
In practice, common outputs include:
-
[* s:r:gc:pro]for pronoun substitutions: possessive for nominative:her/his/theirforshe/he/they) -
[* s:r:prep]for preposition substitutions: e.g., *he is marriedwith(instead ofto) Maria
Scope Notes
- The current runtime follows a narrow prototype scope and does not cover the full CHAT error inventory.
- The paper's model was developed on children's narrative data from the ENNI corpus under low-resource conditions.
- The most realistic use case is assisted annotation and review of plausible error candidates.
Install
Python requirement: >=3.10.
pip install "talk-tag[runtime]"
Runtime extras include torch, transformers, peft, and bitsandbytes.
Runtime support
The current fixed deployment is based on a bnb-4bit Hugging Face model. In
practice, this means:
- CUDA is the preferred accelerated runtime
- CPU is supported as a fallback
- Apple MPS is not supported for this deployment
First-run workflow
- Check environment:
talk-tag doctor
- Pull/warm model assets:
talk-tag model pull --device auto
On Apple Silicon, --device auto will fall back to CPU instead of MPS.
- Run annotation:
talk-tag annotate \
--input-dir ./input \
--output-dir ./output \
--target-speaker "*CHI" \
--device auto
From a repository checkout, try TalkTag with the bundled synthetic transcript instead of private data:
talk-tag annotate \
--input-path ./examples/sample.cha \
--output-dir ./examples/sample_out \
--target-speaker "*CHI" \
--device auto \
--limit 2 \
--show-target
Single-file .cha example:
talk-tag annotate \
--input-path ./input/sample.cha \
--output-dir ./output \
--target-speaker "*CHI" \
--device auto
Show optional real-word reconstructions in the output:
talk-tag annotate \
--input-path ./input/sample.cha \
--output-dir ./output \
--target-speaker "*CHI" \
--show-target \
--device auto
--show-target only affects optional real-word reconstructions such as
[= goes]. Non-word reconstructions such as [: went], which are needed for
analysis, are preserved either way.
For quick debugging, you can also print only the target utterances that changed:
talk-tag annotate \
--input-path ./input/sample.cha \
--output-dir ./output \
--target-speaker "*CHI" \
--limit 5 \
--print-debug-lines \
--device auto
This prints changed lines as original/annotated pairs during the run. It does not change the output file content.
If needed, you can also cap inference for quick local checks:
talk-tag annotate \
--input-path ./input/sample.cha \
--output-dir ./output \
--target-speaker "*CHI" \
--limit 20 \
--device auto
When --limit is greater than 0, TalkTag still writes the output file. It
simply stops annotation after the first N target utterances and prints a
notice that the limit is active.
Inference defaults
max_new_tokens = 128max_seq_length = 512max_context_chars = 1200limit = 0(0means no cap; use it as a debug/testing limit on target utterances)- greedy decoding (
do_sample = false)
The CLI currently exposes:
--limitto cap the number of target utterances processed in one run for testing/debugging; output files are still written--print-debug-linesto print only changed target utterances during a run for quick debugging
Supported runtime inputs
.cha.jsonl(requires--speaker-fieldand--text-field)
The annotate command accepts either:
--input-dirfor folder annotation--input-pathfor a single.chaor.jsonlfile
Other previously supported formats (.txt, .csv, .json, .xlsx) are rejected in adapter-only deployment mode.
Colab quickstart
See examples/colab_quickstart.ipynb for a minimal setup flow.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file talk_tag-0.5.2.tar.gz.
File metadata
- Download URL: talk_tag-0.5.2.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da64712ad09e14c2e0a35faa6fbc090ce38b4e7c43149ce1a0b0e3cfcd9d3bf5
|
|
| MD5 |
9ff5cbfb9eb69a02357c0e182372b922
|
|
| BLAKE2b-256 |
f33343d3b66b26c281b77dd76fb509775a4ab4b772c8292191c54471fa307afa
|
File details
Details for the file talk_tag-0.5.2-py3-none-any.whl.
File metadata
- Download URL: talk_tag-0.5.2-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3e31b83040f61c72990f9ea0d240a856e727a69f294d9d673286abca0d81b21
|
|
| MD5 |
e4b6dc3af410e25496244862cb17752c
|
|
| BLAKE2b-256 |
58b4c22168c56fea6b70cc1d726bccfa5eaf0b33f3b04200aeeee4d4d38a5df6
|