Fixed errors in generateNB.py

Fixed numerous syntax errors, and added smoothing to probability values.
Note some generated probability values may be 0.0, but this is ok as
they are log prob values, and we care about max result, so -v + 0 > -v`
+ -q` will be used in testNB.py when finding class_nb_argmax