As mentioned in the other thread, replacing this kind of argmax is a area of research in itself almost 
I guess the simplest you can try here is to use a weighted version based on the softmax value. So that the predicted value is a weighted value of different dictionary entries.
But this might not work…