Repository navigation
Add BLANK_EXIT transition type for LabelScorers and update tree-based search implementations to use it - #257
Conversation
|
Originally, in the first version of the CtcTreeBuilder, the blank lemma state had a self-loop. I later removed it when I implemented the TreeTimesyncBeamSearch, but not because of redundant hypotheses, but because of the pruning strategy. In the loop, the hypotheses would count as within-word hypotheses and not word-end hypotheses during pruning. I remember we discussed this and of course it's a question of definition (if the word-end is at the last token of the word or the start of the next word, and if successive blanks "count" towards the previous or the next word) and I assume that the effect wouldn't be significant, but technically, I don't think that a hypothesis which is in a blank state between two words should be seen as a within-word hypothesis. |
…ping hypotheses in recombination
larissakl
left a comment
There was a problem hiding this comment.
Instead of the epsilon blank penalty to disadvantage hypotheses that go over the root state for consecutive blanks, we could also think about just removing them by skipping the extension when its current state is the root and both the current and the next tokens are blank.
Independently of that, the blank loop could be problematic for the maximum-stable-delay pruning because the looping hypothesis gets no new trace during a blank segment. If the segment is longer than the delay, the pruning root becomes the trace of the hypothesis that just exited blank and all other hypotheses are pruned.
In principle I like this approach. This would also play better with |
Yes, this could be an issue. In practice, at least when a segmenter is present, this will probably not happen since blank segments will be reasonably short. But without segmentation or very short maximum-stable-delay it could become a problem. The same also applies to silence, not just blank. But perhaps this should be accounted for by the |
I see what you mean. However, with the current tree builder this is fine (especially because you ignore the allow-blank-loop and allow-label-loop parameters for the blank lemma) and for new tree builders, if there will be any, a documentation should actually also be sufficient. Btw, talking about documentation, it would be nice if you could update the documentation for this PR please.
Yes, this sounds like a good compromise. |
Resolve conflicts with the decode-step refactoring from #261: the root blank-to-blank skip moves into createWithinWordExtensions() and the BLANK_EXIT classification into createWordEndExtensions() of both tree searches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Currently, the new tree search algorithms don't distinguish blank lemma exits; they are just classified as regular WORD_EXIT transitions (or can be marked as NONWORD manually). This PR adds a BLANK_EXIT transition type which is assigned to the tree exit corresponding to the blank lemma.
There is one thing to discuss: the tree builder doesn't add loops for the blank lemma state which means that for blank segments between words, every frame counts as a separate blank lemma emission of length 1. The intention behind this is to avoid redundant paths which will later get recombined anyway but now this means that the BLANK_EXIT penalty will be applied for every frame which is unexpected (and undesirable) behavior. The main ways to fix this are: