Skip to content

fix: an "I mean" that starts a correction is no longer cut alone - #398

Merged
znat merged 1 commit into
mainfrom
fix/filler-keeps-cue
Nov 4, 2026
Merged

znat merged 1 commit into
mainfrom
fix/filler-keeps-cue

Conversation

@znat

@znat znat commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

The filler rule cut an "I mean" that starts a correction and left the first try. "Put it in the left panel I mean the right panel" came out as "Put it in the left panel the right panel", which is worse than the input. Now the rule leaves a marker when the syrinx tag head reads it as part of a correction. With parse: vectors the tree cutter then takes the first try and the cue together: "Put it in the right panel". Opt-in only: the filler rule runs with parse: true or parse: vectors on the disfluency step. No Swift change.

Review first: in_correction in built-in/transforms/disfluency/disfluency.py, and the two cases in cases.yaml that now keep a filler.

Real dev, 254 corrections Fixed Partly Missed Damaged False-cut words
parse: true, main 121 21 107 5 85
parse: true, this PR 121 16 115 2 72
parse: vectors, main 141 30 77 6 89
parse: vectors, this PR 145 25 81 3 76
Why the old rule did harm: it cut the cue and never the first try

The filler rule runs after the string rules and before the tree cutter. It judged each marker on the parse of its own sentence only, so the cue of a correction looked like any other "I mean". Two things went wrong.

  • The cue went and the first try stayed. On real dev, 9 of the 14 filler cuts that touch a labelled correction are its cue "I mean". In all 9 the first try stays, with or without the tree cutter. The scorer counts these as partly, but the text reads worse than before.
  • The tree cutter lost fixes. With parse: vectors it proposes the first try and the cue as one cut. If the filler rule already took the cue, the overlap rule drops the proposal. That cost 2 fixed corrections on real dev.

The 4 extra damaged rows are filler cuts right next to a correction: 2 just before it, 2 right after it.

The fix: a marker stays when the tag head reads a correction in or next to it

in_correction(parse, words) returns the parse words that are in a correction the string rules left:

  • the tag head reads the word as a cue, P >= 0.5 (HOLD), or
  • a word within 3 spoken words (NEAR) is read as abandoned, P >= 0.5.

Only words that survived the string rules count. A first try the rules already cut needs no cue, so "So like the the parser" still loses "like". resolve skips a marker with a held word. Nothing else changes, and the rule can only cut less than before.

One pipeline for every language: no per-language branch or threshold. Today only English has markers.

How HOLD and NEAR were chosen: AMI dev and CV dev, then real dev once

Parses come from the app binary (--parse --batch --vectors). Only rows with a marker change. fixed/partly/missed/damaged, f = false-cut words.

AMI dev, 354 marker rows parse: true parse: vectors Marker cuts outside every label
filler rule off 208/32/248/2 246/41/195/8 0
main 187/38/206/59 222/45/160/63 144
HOLD 0.5, cue only 190/37/210/53 225/44/164/57 142
HOLD 0.5, NEAR 2 194/32/236/28 232/41/183/34 134
HOLD 0.5, NEAR 3 196/33/237/24 234/42/184/30 130
HOLD 0.5, NEAR 4 196/33/240/21 234/42/187/27 124
HOLD 0.3, NEAR 3 197/33/240/20 235/42/187/26 118

HOLD 0.5 is the head's own decision point. NEAR 4 buys 3 fewer damaged items for 6 more fillers kept, so NEAR 3. CV dev (52 marker rows) at 0.5/3: parse: true 27/6/42/3 against main's 25/6/41/6, no filler cut lost. Written dictation dev and adversarial dev: every move on main was a cue cut, and at 0.5/3 both equal the filler rule off. Dropping the cue term leaves one cue cut in each of those sets, so it stays.

Real dev was then scored once with these values, through the same harness as #396. Pass line, set before: parse: true damaged <= 2, fixed >= 121, false-cut words <= 85; parse: vectors damaged <= 3, fixed >= 141. Both pass, damaged at the edge. Real dev has been scored several times across these PRs, so a fresh set of dictations is needed before calling this general.

Cases and checks
  • score.py: 104/109, collapse 60/65, keep 44/44. Main on the same file: 103/109, keep 44/44.

  • Two new tree cases: the "left panel / right panel" one above, and "I want the small one, I mean the large one." -> "I want the large one.". Main fails both.

  • Two cases now keep a filler, marked as known misses. The tag head reads "two hundred" in "like two hundred forty-three is is" as abandoned, and "five maximum eight" as a correction, so the marker next to them stays. Both are fillers left in, not wrong cuts.

  • --eval disfluency: parse: vectors 60/65 change, 44/44 keep; parse: true 56/65, 44/44 (the 4 tree cases need vectors).

  • parses.json: 2 entries added, 0 changed, recorded with score.py --record.

  • Check scripts (release build, scratch configs): 17 of 18 pass. check-bug-report fails 25/26 on the ~ home path, the same failure as on feat(disfluency): the tree cutter and the cut filter run after the rules #396. check-pipeline failed 130/134 under load, then passed 134/134 on a rerun; feat(disfluency): the tree cutter and the cut filter run after the rules #396 saw the same.

  • Live gate (--pipeline vocabulary -> disfluency, cp -c homes, one binary): main's rows from feat(disfluency): the tree cutter and the cut filter run after the rules #396 against this PR, both opt-ins. Bench static and chrono at 0.85 and 0.60, 165 dictations each: 2 outputs differ in each job, both a marker the fix keeps (4 marker cuts on main, 2 here). Vocabulary decisions differ 0 times, and bench outcomes are identical. Tree cuts unchanged (3 per job with vectors). French 573 dictations: 0 outputs differ. No declined anywhere.

What this does not fix
  • On real dev, parse: true still has 4 more partly items than with the filler rule off (16 against 12). They are likely cue cuts where the tag head reads neither the cue nor the first try.
  • No labelled set marks discourse markers as fillers, so the filler rule's precision is still unmeasured. The false-cut column counts every filler cut outside a correction, right or wrong.
  • Two wrong outputs outside this change: "by X I mean Y" loses "I mean", and a bare "I mean." becomes ".".

🤖 Generated with Claude Code

https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2

…alone

The filler rule cut "I mean" in "the rain, I mean the sun" and left the
first try, so the text read "the rain the sun". It now leaves a marker
when the syrinx tag head reads one of its words as a cue (P >= 0.5), or
reads a word within 3 spoken words of it as abandoned. Only words the
string rules left count. With parse: vectors the tree cutter then takes
the cue and the first try together.

HOLD and NEAR were chosen on AMI dev and CV dev marker rows. Two cases
now keep a filler where the tag head misreads a number phrase as a
correction; both are marked as known misses. Two new tree cases cover
the cue.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2
Signed-off-by: Nathan Zylbersztejn <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 4, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c0adfa6-9287-47f6-9472-6aa23f1ed45a
Commits

Reviewing files that changed from the base of the PR and between d2a8d9a and 48317d8.

Files selected for processing: 4
  • built-in/config.example.yaml
  • built-in/transforms/disfluency/cases.yaml
  • built-in/transforms/disfluency/disfluency.py
  • built-in/transforms/disfluency/parses.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@znat

znat commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Local review: coderabbit review --agent --committed --base-commit d2a8d9a5 on 48317d8 reported 0 findings on the 4 changed files (config.example.yaml, cases.yaml, disfluency.py, parses.json). Nothing to fix or answer.

The remote CodeRabbit run hit its rate limit on this PR, so it has not reviewed yet.

@znat
znat merged commit c000241 into main Nov 4, 2026
6 checks passed
@znat
znat deleted the fix/filler-keeps-cue branch November 4, 2026 22:24
@znat znat mentioned this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant