Some of the indentation was lost for some reason.
Changed some code in favour of readability. Also added word probabilities. Add -wppl 1 to the command line to active it (only shows the last iteration).