log2_perplexity now runs. I don't know whether it works, however. A quick test gives me a higher perplexity for the beginning of the training corpus than for that same beginning with the words randomly permuted.