3

I've been trying to perform tf-idf heuristic on a large corpus.

Can I iteratively read the documents, and call the

vectorizer.fit()

In each iteration? Does this take into account only the current iteration, or does it remember the previous ones?

Thanks!

sdgaw erzswer
  • 2,182
  • 2
  • 26
  • 45

1 Answers1

1

The solution to your problem will depend on your particular application. You could consider gensim's tfidf implementation which is more efficient and does not need to keep the entire corpus in memory as this post explains.

benbo
  • 1,471
  • 1
  • 16
  • 29