That is a nice summary.
A couple of thoughts to add for those who aren't information-retrieval nerds (this helped solidify TF and IDF in my head >20 years ago):
* I like to think of TF (whatever it's formulation) as how characteristic a term is for a document. "dog" occurs once, then this article isn't really about "dog".
* Similarly, IDF is how distinctive a term is for a document. "the" shows up a lot in English text—so it is characteristic—but it shows up in every text, so it isn't distinctive.
So, in a corpus of English documents, "the" is characteristic (high TF) but not distinctive (low IDF) for any given document. OTOH, in a corpus that's 99% Swahili documents, and a small handful of English documents, "the" is both characteristic (because the docs are in English) and distinctive (because most other docs are not).
Thus, TF is about a given document, and IDF is about the corpus it is part of.
* Those cool graphs in that blog post? Those were obviously done with Desmos (
https://www.desmos.com ) a powerful free HTML5 graphing calculator. We use it to look at scoring components to understand how different formulas behave, and how modifying various parameters affects them. I use it so much, I just wanted to share it.