#### Document-Feature Matrix

A Document-Feature Matrix (DFM) is a mathematical representation where rows are documents, columns are unique tokens (features), and cells contain frequency counts. It converts unstructured text into structured numerical format for computational analysis.

#### Process

- Tokenization: Text is split into individual tokens (words)
- Vocabulary: All unique tokens form the matrix columns
- Counting: Each document-token pair is counted
- Sparse Matrix: Efficient storage format for large corpora

#### Usage

The DFM is the foundation for all downstream analyses including keyword extraction, topic modeling, and semantic analysis. Create it after preprocessing (tokenization, stopword removal, lemmatization).

Learn More: quanteda DFM Documentation