Skip to content

Conversation

@larissakl
Copy link
Contributor

The TransitionLabelScorer was used with a base label scorer. However, we find it more intuitive to have it standalone such that it can be used together with another label scorer in the CombineLabelScorer.
Most function are just no op now and a dummy scoring context was needed.
Depends on #148.

result->score += transitionScores_[request.transitionType];
}
LabelScorer::ScoreWithTime result;
result.score = transitionScores_[request.transitionType];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the timeframe initialized with 0?
Should it be for example currentStep of StepScoringContext class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really use a scoring context in this label scorer and therefore have no information about the current timestep. LabelScorer::ScoreWithTime however needs a timeframe. Therefore I just set it to 0 because it is not used anyways. When using the TransitionLabelScorer in combination with another label scorer in the CombineLabelScorer, the maximum of both timesteps will be used for the result, so 0 won't break anything.

Base automatically changed from disabled-transition-types to master November 5, 2025 14:19
# Conflicts:
#	src/Nn/LabelScorer/CombineLabelScorer.hh
#	src/Nn/LabelScorer/EncoderDecoderLabelScorer.hh
#	src/Nn/LabelScorer/FixedContextOnnxLabelScorer.hh
#	src/Nn/LabelScorer/LabelScorer.cc
#	src/Nn/LabelScorer/LabelScorer.hh
#	src/Nn/LabelScorer/NoContextOnnxLabelScorer.hh
#	src/Nn/LabelScorer/NoOpLabelScorer.hh
#	src/Nn/LabelScorer/StatefulOnnxLabelScorer.hh
#	src/Nn/LabelScorer/TransitionLabelScorer.cc
#	src/Nn/LabelScorer/TransitionLabelScorer.hh
@curufinwe curufinwe changed the title Make Nn::TransitionLabelScorer standalone Update Nn::TransitionLabelScorer: remove wrapped LabelScorer Nov 6, 2025
@curufinwe curufinwe merged commit 5cfe10a into master Nov 6, 2025
2 checks passed
@curufinwe curufinwe deleted the transition-label-scorer-standalone branch November 6, 2025 08:58
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.

5 participants