add lm.py
replace Counter with defaultdict. set log(0.0) to -10000 instead of -inf. replace dict_to_file with ngrams_to_file.