Bag of Words
Also known as · Bag-of-Words · BoW
Describes each document as a vector of word counts and throws away word order, so "The food was great" and "Great was the food" give the same bag. Stacking these vectors gives the Document-Term Matrix.
When to use
It is the step after Text Preprocessing that turns cleaned tokens into numbers a model can use. Know its limitation: removing stopwords can destroy negation, so "not good" looks like "good", and frequency is not importance, which motivates TF-IDF.
See Lec 7.