bag of words update for tf–idf