Added term_frequency.py

alternative generating term.dat