Closed meet-minimalist closed 5 years ago
For the complete sequence the probability is BeamEntry.prTotal . For individual chars the easiest way would be to use best path decoding and then analyze the best path (e.g. take maximum or average of prob if a char is distributed across multiple time-steps).
@githubharald so it is not possible to find individual character probabalities in case of beam search. Right?
it should be possible, as the probabilities for the last character of a beam are taken into account (see variable prNonBlank ) in each iteration. So, each time a character is added to the beam, the probability of this character is known, and also if a character spreads multiple time-steps, this is taken into account, so all the information needed is accessible. It's just about extracting this information while the algorithm iterates through the sequence.
But just to be clear - I would also have to think about how to do it, so please don't expect me to give you instruction on how to implement this or even expect an implementation, you would really have to do it yourself.
I have done exactly the same but I somehow was not able to get the results. May be due to coding error.
But thanks for the idea. 😊
How to get the character level probability along with the string output?