Update tf_idf_base.py