Skip to content

AI-884: never substitute <sw> (speaker switch) with another token - #68

Merged
jprobichaud merged 1 commit into
developfrom
feature/ai-884
Dec 4, 2026
Merged

jprobichaud merged 1 commit into
developfrom
feature/ai-884

Conversation

@jprobichaud

@jprobichaud jprobichaud commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Linear: AI-884

What

<sw> can now only be correct, inserted or deleted. It is never substituted with another token on either side, much like strict punctuation keeps punctuation from aligning with words.

  • Adapted composition (the default): the substitution arc is skipped when either label is <sw>.
  • Standard composition: <sw> gets no id:sub or sub:id arcs in the half-edit transducers.
  • The rule is always on, with no flag. When <sw> isn't in the symbol table, nothing changes.

Test

New sw_1 section, run under both compositions, covering ref <sw> vs hyp word, hyp <sw> vs ref word, and a <sw>:<sw> match.

WER INS DEL SUB
before 2/14 0 0 2
after 4/14 2 2 0

fstalign_Test, compose-tests and fast-d-tests all pass.

Experiment check

Rerun of sfclip-v3s-quant-sw-hs128 (71 files, same flags):

<sw> subs <sw> ins WER INS DEL SUB
before 1,325 5,287 24,769 / 172,427 = 14.36% 13,188 2,365 9,216
after 0 6,612 25,405 / 172,415 = 14.73% 13,978 3,143 8,284
  • All 1,325 former <sw> substitutions are now insertions.
  • WER goes up by 636 errors, not 1,325, because many displaced ref words now align correctly elsewhere.
  • The reference total moves by 12 words because different paths pick different verbalizations of normalized entities.

🤖 Generated with Claude Code

<sw> (speaker switch) can now only be correct, inserted or deleted,
like strict punctuation. Applies to both adapted and standard
composition. Adds sw_1 regression test (both directions + a <sw>:<sw> match).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jprobichaud

Copy link
Copy Markdown
Contributor Author

@claude do an adversial review

@jprobichaud
jprobichaud merged commit 0338c74 into develop Dec 4, 2026
6 checks passed
@jprobichaud
jprobichaud deleted the feature/ai-884 branch December 4, 2026 16:21
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