> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/machine-learning/spacy/language-processing-pipelines.md).

# Language Processing Pipelines

When you call `nlp` on a text:

### Pipeline:

1. Spacy tokenizes text -> produces `Doc` object and this object is passed through the next steps
2. Tagger
   * Assigns POS labels
3. Parser
   * Assigns dependency labels
4. ner
   * Detect and label named entities
5. Final Doc object has been processed

### Training

* Gather training data and evaluation data - ie. examples of text and labels (could be POS, named entity, etc.)
* Model is shown unlabelled text and makes a prediction (statistical model)
* Since we know the correct answer, can provide loss function
