Corpus, Document, and Sentence
A corpus is the collection of text used for a task.
A corpus may contain books, articles, code files, messages, transcripts, or a small toy list of sentences. The size can be huge or tiny. The idea is the same: this is the text the model is allowed to learn from or be evaluated on.
A document is one unit inside the corpus. In a book corpus, one book may be a document. In a code corpus, one file may be a document. In a chat corpus, one conversation may be a document.
A sentence is a smaller unit, but sentence boundaries are not always simple. Periods can end sentences, appear in abbreviations, or appear in numbers.
For a tiny corpus:
Document 1: I like tea. I like coffee.
Document 2: Tea is warm.
The corpus has 2 documents. Depending on the sentence splitter, it may have 3 sentences.
A tiny corpus has note1.txt, note2.txt, and note3.txt. How many documents does it contain if each file is one document?
Compute it first, then check your number.
The important habit is to name the unit. A model cannot know whether a boundary means sentence, paragraph, file, conversation, or nothing unless the data pipeline makes that choice.