modify TfIdf datastructure to dict