Syntax and runtime fixes

Fixed some errors involving log calculations in testLM.py and
generateLM.py.

generateLM.py now uses log2 instead of log10. This was done as although
the book recommends log10, the assignment calls for log2.

This also allows testLM.py to assume the log2 operation was done
beforehand, and so can both skip the operation, and do W+P instead of
W*P to save time. Log rules and testing confirmed equivalent results.

TODO: Our perplexity value still seems low, so I need to compare to nltk
and do more testing. Training is still SLOW for weights, so I need to
re-evaluate my code and research existing algorithms, as well as change
my data structure usage.