# What is Bag of Words? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Natural Language Processing  
> **Canonical Citation:** [https://spidits.com/ai-glossary/bag-of-words](https://spidits.com/ai-glossary/bag-of-words)

## Definition
Bag of Words (BoW) is a simplified representation model used in natural language processing and information retrieval. In this model, a text (such as a sentence or a document) is represented as the bag (multiset) of its words, disregarding grammar and word order but keeping multiplicity.

## Architectural Mechanics & Deep Dive
The Bag-of-Words (BoW) model is a classic, simplified text representation technique used in natural language processing. It represents a document as an unordered collection of its words, disregarding grammar, word order, and syntax, and simply keeping track of word frequencies. While computationally lightweight and useful for basic document classification, BoW fails to capture semantic meaning, context, or homographs, which are better handled by vector embeddings.

## Industry Applications & Real-World Use Cases
Document classification, spam filtering, and basic text representation.

## Frequently Asked Questions

### What is the main disadvantage of the Bag of Words model?
It completely ignores word order and context, meaning sentences like "not bad, good" and "not good, bad" have the exact same representation.

### How does Bag of Words convert text to numbers?
By creating a vocabulary dictionary of all unique words and representing each document as a vector containing the frequency counts of those words.

## Related Terminology
- [nlp](https://spidits.com/ai-glossary/nlp)
- [one-hot-encoding](https://spidits.com/ai-glossary/one-hot-encoding)
- [tokenization](https://spidits.com/ai-glossary/tokenization)

---
*From the SPIDITS AI Knowledge Base (336+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
