In NLP, a corpus refers to a collection of written or spoken texts that serves as a dataset for linguistic analysis. Corpora are often used to train NLP models and evaluate their performance.