Looking at the sklearn tfidf page: https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html and trying to understand the difference between term frequency and document frequency. My guess is that term frequency is the number of times the word appears in all the entire corpus, and that document frequency is the number of document or sentences a particular word appears in. For example if I have the following:
corpus = [ 'This is the first line.', 'This line is the second line.', 'And this is the third one.', 'Is this the first line?', ]
line appears in three documents or sentences but the total count for the entire corpus is four. So would it be that the
document frequency is
3 and the
term frequency is
4? Is this correct?