added smoothing.py

this code is copied directly from perplexity.py except with the 1
addition of a smoothing function- i get the same results- which makes
me doubt that the function is working