Introduction
Raw text is not yet a language-modeling dataset.
Before a model can learn from text, we need to decide what counts as the corpus, how documents are separated, how text is cleaned, and how examples are split for training and evaluation.
These choices are not decoration. They can change the task.
In this chapter, you will learn to ask:
- What text is in the corpus?
- Where do documents and sentences begin and end?
- What cleanup changes the text?
- Are we looking at characters or words?
- Could future text leak into training examples?
The chapter stays practical. The goal is not to build a perfect data pipeline. The goal is to see that text preparation is part of the model's evidence.