separated functions to create IF-IDF vector.