版权声明:本文为博主原创文章,转载请注明出处。 https://cloud.tencent.com/developer/article/1437731
水平有限,如有错误请指正!
a document or zone that mentions a query term more often has more to do with that query and therefore should receive a higher score
query term
: a set of words
NN:document中term的总数
tt:document中term出现的次数
tft=tN
tf_t=\frac{t}{N}
NN: document的数量
dftdf_t:有多少documents 包含tt
idft=logNdft
idf_t=log\frac{N}{df_t}
从公式可以看出:
tf-idft,d=tft,d∗idft
\text{tf-idf}_{t,d}=tf_{t,d}* idf_t
参考: